Laravel Community Tools by Tighten

Popular tricks

458 tricks
If You're raning Laravel 5.4, You May Get An Error While You'are Migrate Or Dealing with the db . The Error is look like : [Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table users add unique users_email_unique(email)) [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
AdeLDev 7 years ago 9283
5.4
The following example shows an controller with a method, in which we change some values from the .env. Make sure, the entries you want to change, really exist in your .env. https://github.com/Brotzka/laravel-dotenv-editor
ramesh 9 years ago 9274
5.0
SharpAPI AI Translator for Laravel Nova – the package that’s here to make your content translation smoother and smarter with the power of SharpAPI's Advanced Text Translator AI API and to leverage AI for Laravel. This package extends the already-awesome Spatie's laravel-translatable with a Nova action you can trigger from your resource’s edit or list views. Details at https://github.com/sharpapi/nova-ai-translator
makowskid 1 year ago 9269
This code snippet overrides DuskTestCase->createBrowsers method to allow HTML elements count assertion
nezarfadle 9 years ago 9277
Sometimes you need to use some packages based on the environment in which the application is running in, for example "development". You can append environment service providers and aliases in your development configuration file "app/config/development/app.php" with the "append_config" helper method.
hosmelq 12 years ago 9203
4.1
For example, if you are using a caching server which listens on HTTPS, which retrieves your content from another (local server) which isn't using HTTPS, your links might be generated as http://mysite.com instead of the desired https://mysite.com. With this trick you can circumvent this.
berendiwem... 12 years ago 9237
Laravel Load More Data on Page Scroll – Laravel 5
dave 9 years ago 9234
There are many tricks to return the response in `json`. Actually, if the returned value is an array or instance of "arrayableinterface" or "jsonableinterface" such as eloquent model, you could just return it, it'll be a json, magically. There are following three way i have noticed performance :) Thanks. #KeepSharing
pratikbuta... 11 years ago 9223
It's possible to add condition to your model's relationships... Help me to use Eloquent with a legacy database..
Matt 12 years ago 9187