Compare commits

...

3 Commits

Author SHA1 Message Date
aslan 27cbb5d8cf desc sort to direction
Tests & Lint & Deploy to Railway / build (2.6.6, 20.x, 8.3) (push) Successful in 1m48s Details
Tests & Lint & Deploy to Railway / deploy (push) Successful in 31s Details
2024-03-13 14:29:58 +03:00
aslan 858492cd2e fix cost_paid_place table directions field name 2024-03-13 14:08:40 +03:00
aslan f5638722a6 fix unique table directions field name 2024-03-13 14:06:50 +03:00
2 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ class DirectionController extends Controller
{
public function index(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application
{
$directions = Direction::all();
$directions = Direction::all()->sortBy('created_at', SORT_REGULAR, true);
return view('admin.catalog.direction.index', compact('directions'));
}

View File

@ -10,7 +10,7 @@ return new class extends Migration
{
Schema::create('directions', function (Blueprint $table) {
$table->id();
$table->string('name', 255)->unique();
$table->string('name', 255);
$table->string('full_name', 255);
$table->text('description')->nullable();
$table->string('code', 255);
@ -22,7 +22,7 @@ return new class extends Migration
$table->smallInteger('budget_places');
$table->smallInteger('quota');
$table->smallInteger('paid_places');
$table->smallInteger('cost_paid_place');
$table->integer('cost_paid_place');
$table->float('period');
$table->timestamps();
});