[Laravel] unserialize(): Error at offset 2 of 32758 bytes
Answers in Frameworks | By August R. Garcia
Published
Solved, basically
MoreSome max-size issue with Laravel caching library. <?php // Fix weird issue with cache // unserialize(): Error at offset 2 of 32758 byt...[Solved] Laravel - How to List All Queries Used to Generate a Page with Execution Times
Answers in Frameworks | By August R. Garcia
Published | Last Update
How to show color-coded boxes for each q...
MoreRework/expansion of a solution provided in a Stack Overflow thread from 2 years, 11 months ago (December 2016). My team and I are working on...[Solved] Custom Validation Rule in Laravel to Check Maximum Field Length Excluding HTML Characters
Answers in Frameworks | By August R. Garcia
Published
E.g., a validation rule where "<...
MoreE.g., a validation rule where "<p>This is a post</p>" is counted as 14 characters instead of 26 characters. Anyway, here'...[Solved] Laravel - "Cannot access protected property Illuminate\Pagination\LengthAwarePaginator::$currentPage"
Answers in Frameworks | By August R. Garcia
Published
Call the currentPage and lastPage method...
MoreIncorrect: <h1>Page {{ $paginator->currentPage }} of {{ $paginator->lastPage }}</h1> Correct: <h1>Page {{ $pagina...[Solved] Fix to "the page has expired due to inactivity please refresh and try again" in Laravel (even when page has been refreshed)
Answers in Frameworks | By August R. Garcia
Published
I'm going to fucking kill myself on live...
MoreThe problem was that two new helper files had been added. Similar to these: https://laravel-news.com/creating-helpers Fairly standard. A...Last ReplyThank you Univa, you're a very smart gentleman and also a nice companion in life. Scuffed Dog,
Thank you Univa, you're a...
[Laravel/Eloquent] How to use the with() method/eager loading for a calculated field?
Answers in Frameworks | By Some Guy
Published
Last ReplyEager loading is achieved using the Include() method. for example: LINQ Query Syntax: using (var context = new SchoolDBEntities())... Univa,
Eager loading is achieved...
Last ReplyAlso, if you're having a caching issue with Laravel and php artisan dump-autoload didn't fix your problem, you can also try this: php compos... August R. Garcia,
Also, if you're having a...
How to do a LEFT JOIN / leftJoin() subquery using Laravel's Eloquent query builder?
Answers in Frameworks | By Some Guy
Published
Last ReplyTo use subqueries with Laravel's query builder, you should add it to the join as follows: ->leftJoin(DB::raw("(SELECT [...]) AS p"), 'p.post_i... Univa,
To use subqueries with La...
Laravel 301 all pages to the www version and the https version.
Answers in Frameworks | By Some Guy
Published
Last ReplyUpdate. Don't fucking use the code in the previous post I made. Use this code: <IfModule mod_rewrite.c> <IfModule mod_negotiation.c... August R. Garcia,
Update. Don't fucking use...
Fixing "the only supported ciphers are aes-128-cbc and aes-256-cbc with the correct key lengths?"
Answers in Frameworks | By Some Guy
Published
Last ReplyStep 1: Make sure you have .env file in your application.If not run this command cp .env.example .env Step 2: Now run following command ( php artisan... Univa,
Step 1: Make sure you hav...
[Solution] How to View Queries in Laravel for Debugging
Answers in Frameworks | By August R. Garcia
Published | Last Update
Ghetto hack edition.
MoreStep 1: Open app/Providers/AppServiceProvider.php Step 2: Add this code to the boot() function: if ( TRUE ) { $G...How to Automatically Merge and Minify CSS Files in Laravel 5.7
Articles in Frameworks | By August R. Garcia
Published | Last Update
This also basically works for PHP in gen...
MoreChoose a CSS minifying function. This function from Datayze combined with this additional function to remove comments works fine. Ideally move th...Last ReplyReinstallation can be done through Windows itself but seeing your situation, you don't need anything more than a clean install as you've uninstalled t... roxblade,
Reinstallation can be don...
[Laravel/PHP] How to Make a “Recently Viewed Posts” Widget
Articles in Frameworks | By August R. Garcia
Published
Holy shit, use krsort(), not arsort().
MoreOkay, you fucking cocksuckers, I'm going to stab myself for the reason stated in the description.Anyway, here's some code to make a fucking "recently...[Laravel] How do I get the created_at and updated_at fields to set correctly when inserting data directly to a MySQL/MariaDB database?
Answers in Frameworks | By Some Guy
Published
Last ReplyINSERT INTO some_table (created_at, updated_at, some_data) VALUES (NOW(), NOW(), "Here is some other data."); About the NOW() functi... August R. Garcia,
INSERT INTO some_table&nb...
Last Reply// The query in Eloquent $posts = Post::orderBy('id', 'DESC'); // Run the query and get the results $posts = $posts->get(); Laravel Doc... August R. Garcia,
What is the best way to 301 a website from http to https in a Laravel project?
Answers in Frameworks | By Some Guy
Published
Last ReplyGo to /public/.htaccess and set up a 301 the same as you would for a non--Laravel website. August R. Garcia,
Go to /public/.htaccess a...
Last ReplyGo to /public/.htaccess and you will find a default .htaccess to work off of. August R. Garcia,
Go to /public/.htaccess a...
[Laravel] How to make a route function return a controller?
Answers in Frameworks | By Some Guy
Published
[Laravel/Eloquent] What is "active" when referring to Laravel models?
Answers in Frameworks | By Some Guy
Published
How to fix "No supported encrypter found. The cipher and / or key length are invalid?"
Answers in Frameworks | By Some Guy
Published
[Laravel] When using DB::select(), how can I get the result as a Collection?
Answers in Frameworks | By Some Guy
Published
[Laravel] Is it possible to have nested eager loading for specific columns?
Answers in Frameworks | By Some Guy
Published
[Laravel] How to convert a collection to an associative array?
Answers in Frameworks | By Some Guy
Published
Help with "PHP Warning: strtolower() expects parameter 1 to be string, object given in /projectname/vendor/Laravel/fRAMework/src/Illuminate/Database/GRAMmar.PHP on line 58?"
Answers in Frameworks | By Some Guy
Published