Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Lara Core Laravel Package

sinarajabpour1998/lara-core

View on GitHub
Deep Wiki
Context7

Lara Core

This package provides core features [access control list and user manager] for laravel apps.

Installation

Using Composer :

composer require sinarajabpour1998/lara-core

packagist : lara-core

ACL Usage

  • Change the user modal namespace to laratrust config (located in /config/laratrust.php) in user_models section :
'user_models' => [
    'users' => 'App\Models\User',
],
  • Publish blade files
php artisan vendor:publish --tag=lara-core

** Please note if you already published the vendor, for updates you can run the following command :

php artisan vendor:publish --tag=lara-core --force
  • Add the following tag in your sidebar layout :
<x-acl-menu></x-acl-menu>

or shorten tag :

<x-acl-menu />

Google Recaptcha usage

Set the values for google api in .env file:

GOOGLE_RECAPTCHA_SITE_KEY=
GOOGLE_RECAPTCHA_SECRET_KEY=

Add this tag in blade files:

<x-cutlet-recaptcha :has-error="$errors->has('g-recaptcha-response')"></x-cutlet-recaptcha>

Add the validation rule:

protected function validateLogin(Request $request)
    {
        $request->validate([
            $this->username() => ['required', 'string'],
            'password' => ['required', 'string'],
            'g-recaptcha-response' => ['required', 'cutlet_recaptcha']
        ]);
    }

Customize the language and validation message in config file:

return [
    'language' => 'fa',
    'site_key' => env('GOOGLE_RECAPTCAH_SITE_KEY'),
    'secret_key' => env('GOOGLE_RECAPTCAH_SECRET_KEY'),
    'message' => 'شما به عنوان ربات تشخیص داده شده‌اید'
];

Config options

You can set custom permissions for each section of this package. make sure that you already specified permissions in a seeder.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor