Summer Sale! All accounts are 50% off this week.

anjanesh's avatar

anjanesh started a new conversation+100 XP

2w ago

Upgrading Laravel 12 to 13 with some deps without using Shift

I have a Laravel 12 site on PHP 8.2 at cloudways. I need to upgrade this to Laravel 13. How complicated would it be - anything to watch out for ? (Can't spend $99 on Shift for this pet project)

    "require": {
        "php": "^8.2",
        "elasticsearch/elasticsearch": "^9.2",
        "intervention/image": "^3.11",
        "intervention/image-laravel": "^1.5",
        "laravel/framework": "^12.0",
        "laravel/sanctum": "^4.1",
        "laravel/scout": "^10.22",
        "laravel/tinker": "^2.10.1",
        "maatwebsite/excel": "^3.1",
        "spatie/laravel-permission": "^6.20",
        "spatie/laravel-sitemap": "^7.3"
    },

What command should I run to upgrade this safely ?

anjanesh's avatar

anjanesh wrote a reply+100 XP

4w ago

How connect to MySQL database container with table plus?

Follow up question - can we have the data of the database in my local instead of in the container ? Because, each time I do docker compose up --build the data doesn't persist from the previous docker session(s).

anjanesh's avatar

anjanesh started a new conversation+100 XP

2mos ago

Exception on server but works fine on localhost

I just included @include('partials.homepage-schemas') in my index.blade.php and partials/homepage-schemas.blade.php contains this kind of text :

My localhost works fine with the change but no my server I get :

syntax error, unexpected end of file, expecting "elseif" or "else" or "endif" (View: /home/path/public_html/resources/views/partials/homepage-schemas.blade.php) (View: /home/path/public_html/resources/views/partials/homepage-schemas.blade.php)
anjanesh's avatar

anjanesh wrote a reply+100 XP

4mos ago

anjanesh's avatar

anjanesh wrote a reply+100 XP

4mos ago

php artisan migrate attempted running from the first migration file instead of the last one(s)

Nothing was changed in config/database.php - using default values.

anjanesh's avatar

anjanesh started a new conversation+100 XP

4mos ago

php artisan migrate attempted running from the first migration file instead of the last one(s)

When I ran php artisan migrate on my server why didn't it automatically run the last migration file ? Why did it try starting from the first one instead ? I checked the database - all but the last one were listed in the migrations table.

 INFO  Running migrations.  

  2014_10_12_000000_create_users_table ................................................................................................ 10.45ms FAIL

   Illuminate\Database\QueryException 

  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists (Connection: mysql, SQL: create table `users` (`id` bigint unsigned not null auto_increment primary key, `name` varchar(125) not null, `email` varchar(125) not null, `email_verified_at` timestamp null, `password` varchar(125) not null, `remember_token` varchar(100) null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:824

I had to resort to running php artisan migrate --path=/database/migrations/2026_03_04_080009_change_schema_tag_column_length_in_products_table.php on PROD.

anjanesh's avatar

anjanesh started a new conversation+100 XP

4mos ago

Laravel and WordPress on same git on separate branches

Not sure about how to go about doing this - just checking if this is technically possible.

New project in GitHub.

main branch has an empty/hello-world index.php file.

laravel branch has an entire Laravel 12 setup

wordpress branch has an entire WordPress setup. No .env here since its all in config.php

Can I setup 2 servers (or one server and 2 apps) where WordPress is running on the wordpress branch and Laravel is running on the laravel branch.

Can there be any collision ?