anjanesh started a new conversation+100 XP
2w ago
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 wrote a reply+100 XP
4w ago
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 started a new conversation+100 XP
2mos ago
I just included @include('partials.homepage-schemas') in my index.blade.php and partials/homepage-schemas.blade.php contains this kind of text :
<!-- Website Schema -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "xxx",
"url": "https://example.test/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://example.test/?s={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
<!-- Organization Schema -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "xxx",
"url": "https://example.test/",
"logo": "https://example.test/front-end/images/logo.avif",
"contactPoint": {
"@type": "ContactPoint",
"telephone": "+91-999999999",
"contactType": "sales",
"areaServed": "IN",
"availableLanguage": ["English"]
},
"sameAs": ["https://www.linkedin.com/company/xxx", "https://www.facebook.com/xxx", "https://www.youtube.com/channel/xxx"]
}
</script>
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 wrote a reply+100 XP
4mos ago
Checked it online - it was at cloudways.
anjanesh wrote a reply+100 XP
4mos ago
Nothing was changed in config/database.php - using default values.
anjanesh started a new conversation+100 XP
4mos ago
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 started a new conversation+100 XP
4mos ago
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 ?