Laravel Basic #2
Aug 16, 2021
MySQL DB make Table
use Illuminate\Support\Facades\DB;
- getData from DB
Within Function
{
$data = DB::table(‘table_name’)-> getData();
}
2. make a table
Command
php artisan make:migration create_AAAAAs
Set your Column
public function up()
{
Schema::create('AAAAAs', function (Blueprint $table) {
$table->id();
$table->string('title') ;
$table->string('content');
$table->integer('price');
$table->timestamps();
});
}
And Command
php artisan migrate