Skip to main content
0 votes
1 answer
102 views

I’m building a job board project in Laravel, and I’m trying to establish a one-to-one relationship between User and Employer. However, my database table is not being generated correctly — the columns ...
Izedin Abaoli's user avatar
0 votes
1 answer
64 views

I have laravel 12/ postgresql 17 app and in a table with 2 fields unique field : Schema::create('posts', function (Blueprint $table) { $table->id(); $table->foreignId('action_id')->...
mstdmstd's user avatar
  • 3,309
1 vote
0 answers
68 views

I have a Laravel seeder that is only inserting one record when I have a factory and the seeder should insert 2500 records. Factory: public function definition(): array { $timestamp = $...
kirkaracha's user avatar
0 votes
1 answer
62 views

I'm encountering a BadMethodCallException when running migrations on a pre-existing Laravel application. The error message I'm getting is: Method %s: %s does not exist. at vendor\laravel\framework\src\...
Kazee Tours Travels Treks Tou's user avatar
1 vote
1 answer
435 views

I have some JSON files, and I want to use them to seed my database in Laravel. Could someone guide me on how to achieve this? Specifically, I want to: Migrate the database tables required for the ...
Muhammed Salama's user avatar
0 votes
1 answer
693 views

Starting from Laravel 11 (and unchanged in Laravel 12), migrations are required to include all attributes of a column in such cases, even those that are not being modified. Otherwise, those attributes ...
rozsazoltan's user avatar
  • 18.2k
0 votes
1 answer
63 views

I have more than once been in the situation where I'll be working on a migration, and the up() function fails. I would like the use the down() function of that migration, but running php artisan ...
Sonny's user avatar
  • 8,366
-2 votes
1 answer
62 views

Schema::create('jobs', function (Blueprint $table) { $table->id(); $table->string('title'); $table->text('description'); $table->unsignedInteger('salary'); $table->...
inta3's user avatar
  • 7
0 votes
1 answer
409 views

I have this migration. I am using Postgres, I found that generatedAs and storedAs are supported by Postgres.. I am a beginner in Postgres. Schema::create('users', function (Blueprint $table) { $...
Watheq Alshowaiter's user avatar
1 vote
0 answers
130 views

I'm working on a Laravel project that uses multiple MySQL databases. The main database (core_db) contains system tables like users, migrations, etc., while express_db and regio_db contain most of the ...
spyro95's user avatar
  • 156
0 votes
1 answer
102 views

I made a migration in Laravel 10.48.14 app : <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class ...
mstdmstd's user avatar
  • 3,309
0 votes
1 answer
217 views

I'm trying to change the execution order of Laravel migrations because of foreign key constraints and I found some solutions like: 1- it can be done by renaming migration files to get it in the ...
Ahmad Ahmad's user avatar
0 votes
0 answers
24 views

Using Laravel V10.42.0 This is my route function Route::get('/posts', function () { return view('posts',[ 'posts' => Post::All() ]); }); This is my Posts.php file <?php ...
Mahmoud M. Matouk's user avatar
1 vote
0 answers
43 views

I am running Laravel Migration and this is how it looks on terminals adding a column state_id on the click table which contains millions of records. state_id is nullable and has no default value with ...
Furqan Freed's user avatar
0 votes
0 answers
118 views

I want to make a new command in Laravel that creates a migrationfile and also prefills it with table definitions. I already know that the MigrationCreator uses stubs as template and populates it with ...
Peter de Groot's user avatar

15 30 50 per page
1
2 3 4 5
35