Mapbox GL

Mapbox GL is a suite of open-source libraries for embedding customizable and responsive client-side maps in web, mobile, and desktop applications. Mapbox GL maps render at a high frame rate. The abbreviation “GL” comes from OpenGL, the industry-standard Open Graphics Library. Mapbox GL allows you to use custom styles designed in Mapbox Studio. You can also manipulate every aspect of …

Laravel Sanctum

Laravel Sanctum provides a featherweight authentication system for SPAs (single page applications), mobile applications, and simple, token based APIs. Sanctum allows each user of your application to generate multiple API tokens for their account. These tokens may be granted abilities / scopes which specify which actions the tokens are allowed to perform. How It Works …

Some tips to reinforce security in Laravel

Prevent from Brute-force attack In Laravel 7, Illuminate\Foundation\Auth\ThrottlesLogins is already there in LoginController which is used to prevent brute-force attack. Route::post(‘login’, ‘Auth\LoginController@postLogin’)->middleware(“throttle: maxAttempts, decayMinutes“); Prevent from going back in browser history after login/logout After logout, users should not be able to go back to the previous page by using browser’s “back” button. We need to add …

Laravel hashid

Hashid is a Laravel package, which encode/decode id of Laravel model and get hashed/unhashed version. It is useful when we want to hide the actual id of db object so that users don’t know the real id. composer require vinkla/hashidsphp artisan vendor:publish This will create a config/hashids.php file in your app that you can modify to set …

Using LaravelCollective

This is a set of packages to help us working with HTML, Remote, Annotations and Errors in Laravel. How to install composer require laravelcollective/html Basic Usage Opening a form tag:{!! Form::open([‘url’ => ‘foo/bar’]) !!} Generating a drop-down list: {!! Form::select(‘size’, [‘L’ => ‘Large’, ‘S’ => ‘Small’]) !!} Documentation For further information, please check this documentation: https://laravelcollective.com/docs/6.0/html

laravel-activitylog

spatie/laravel-activitylog package provides easy to use functions to log the activities of the users of your app. It can also automatically log model events. All activity will be stored in the activity_log table. Here’s a litte demo of how you can use it: activity()->log(‘Look mum, I logged something’); You can retrieve all activity using the Spatie\Activitylog\Models\Activity model. Activity::all(); Here is …