Download the PHP package bondarde/laravel-toolbox without Composer

On this page you can find all versions of the php package bondarde/laravel-toolbox. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-toolbox

LOX

Installation

composer require bondarde/lox

php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"

If needed, customize table names in config/permission.php, e.g.:

'table_names' => [
    'roles'                 => 'acl_roles',
    'permissions'           => 'acl_permissions',
    'model_has_permissions' => 'acl_model_has_permissions',
    'model_has_roles'       => 'acl_model_has_roles',
    'role_has_permissions'  => 'acl_role_has_permissions',
],

Run migrations:

php artisan migrate

If needed, add middleware aliases to the app/Http/Kernel.php file, in the $middlewareAliases array:

protected $middlewareAliases = [
    …
    'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class,
    'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class,
    'role_or_permission' => \Spatie\Permission\Middlewares\RoleOrPermissionMiddleware::class,
    …
];

If needed, grant "super-admin" role all permissions in AuthServiceProvider's boot() method:

Gate::before(
    fn($user, $ability) => $user->hasRole(AclSetupData::ROLE_SUPER_ADMIN) && $ability !== AclSetupData::PERMISSION_VIEW_MODEL_META_DATA
        ? true
        : null
);

Create super-admin role and all configured roles/permissions:

php artisan acl:update-roles-and-permission

After signing up, assign admin group to (your) user by ID or e-mail address:

php artisan acl:make-super-admin 1

or:

php artisan acl:make-super-admin [email protected]

Publish config:

php artisan vendor:publish --provider="BondarDe\Lox\LoxServiceProvider" --tag=config

This command also publishes:

Styles

Publish:

php artisan vendor:publish --provider="BondarDe\Lox\LoxServiceProvider" --tag=styles

Add them to your resources/scss/app.scss:

@tailwind base;
@tailwind components;
@tailwind utilities;

@import 'lox/base';
@import 'lox/tools';
@import 'lox/boolean';

Tailwind config:

php artisan vendor:publish --provider="BondarDe\Lox\LoxServiceProvider" --tag=tailwind

Burger menu as Tailwind plugin:

php artisan vendor:publish --provider="BondarDe\Lox\LoxServiceProvider" --tag=tailwind-burger-menu

Laravel Vite & Tailwind CSS

package.json:

{
    "private": true,
    "scripts": {
        "dev": "vite",
        "build": "vite build"
    },
    "devDependencies": {
        "autoprefixer": "^10.4.0",
        "laravel-vite-plugin": "^0.5.2",
        "postcss": "^8.4.4",
        "sass": "^1.30.0",
        "sass-loader": "^12.6.0",
        "tailwindcss": "^3.2.0",
        "vite": "^3.0.4"
    }
}

Build and Deployment

Build for different stages:

composer/bin/dep build stage=test
composer/bin/dep deploy stage=test

For local OPCache reset, a call to http://127.0.0.1/opcache-reset.php has to call PHP’s opcache_clear()

If not possible, add in deploy.php:

set('opcache_reset_mode', 'remote');

User deployer should be able to execute sudo without password prompt for chmod, chown and chgrp:

sudo visudo

deployer ALL=(ALL:ALL) NOPASSWD: /usr/bin/chmod *
deployer ALL=(ALL:ALL) NOPASSWD: /usr/bin/chown *
deployer ALL=(ALL:ALL) NOPASSWD: /usr/bin/chgrp *

Vite Builds

npm run vite

npm run vite build

Usage

Page structure:

<x-page
    title="Page Title"
    h1="Headline"
>
    <p>Your page content, beautifully staged.</p>
</x-page>

For page component you have to create page header and footer:

php artisan make:component HtmlHeader
php artisan make:component PageHeader
php artisan make:component PageFooter

php artisan make:component AdminPage

Forms

<x-form-row
    for="input-name"
>
    ...
</x-form-row>

Buttons

TBD

FortifyServiceProvider

Publish:

php artisan vendor:publish --provider="Laravel\Fortify\FortifyServiceProvider"

Add in boot():

Fortify::registerView(config('lox.views.auth.register'));
Fortify::loginView(config('lox.views.auth.login'));
Fortify::confirmPasswordView(config('lox.views.auth.confirm-password'));
Fortify::requestPasswordResetLinkView(config('lox.views.auth.forgot-password'));
Fortify::resetPasswordView(config('lox.views.auth.reset-password'));
Fortify::twoFactorChallengeView(config('lox.views.auth.two-factor-challenge'));
Fortify::verifyEmailView(config('lox.views.auth.verify-email'));

In config/app.php add service provider:

\App\Providers\FortifyServiceProvider::class,

Database Session storage:

php artisan session:table

php artisan migrate

SSO

Add "sso" to features array in config/fortify.php.

In config/fortify-options.php, add SSO providers, e.g.:

return [
    'sso' => [
        'apple' => true,
        'facebook' => true,
        'twitter' => true,
    ],
];

For each provider, install Socialite Providers package:

composer require socialiteproviders/<provider>

Follow installation steps: https://socialiteproviders.com/


All versions of laravel-toolbox with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
bondarde/php-utils Version ^0.5.0
deployer/deployer Version ^7.0
diglactic/laravel-breadcrumbs Version ^9.0
firebase/php-jwt Version ^6.3
jenssegers/agent Version ^2.6
laravel/fortify Version ^1.10
laravel/framework Version ^11
laravel/scout Version ^10.2
laravel/socialite Version ^5.5
livewire/livewire Version ^3.0
openai-php/laravel Version ^0.10.0
spatie/laravel-permission Version ^6.0
spatie/laravel-translatable Version ^6.5
teamtnt/laravel-scout-tntsearch-driver Version ^14.0
tinymce/tinymce Version ^7.0
tweeb/tinymce-i18n Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bondarde/laravel-toolbox contains the following files

Loading the files please wait ....