Skip to content

Latest commit

 

History

History
165 lines (113 loc) · 5.09 KB

README.md

File metadata and controls

165 lines (113 loc) · 5.09 KB

Laravel JetStream Livewire Starter Project

This is a starter project for the new laravel package JetStream introduced on Laracon. It also provide some help setting/using JetStream

Instalation

  1. Install composer dependencies: composer install

  2. Setup environment

    1. Create .env file cp .env.example .env

    2. Generate a new key: ```php artisan key:generate```
  3. Install npm dependencies and build dev: npm install && npm run dev

Database setup

Setup your database connection. Update your .env with your databse:

  • Driver
  • URL
  • Port
  • Name
  • User
  • Password

After setup your databse connection run php artisan migrate

You can start the server using php artisan serve

JetStream Options

Setup Permissions

You can setup the permissons of your application.

Go to file, app/Providers/JetstreamServiceProvider.php

On method configurePermissions(), is where you will setup your permission.

Setup Api Tokens Permissions

You can add permissions to JetStream like this:

Jetstream::permissions([
    'create',
    'delete',
    'update',
    'read',
    'create:server'
]);

Team Options

Setup Roles

To can setup the roles of your application.

Go to file, app/Providers/JetstreamServiceProvider.php

On method configurePermissions(), is where you will setup your roles.

Add New Role

You can setup the role:

  • key
  • name
  • permissions
  • description.
Jetstream::role('editor', 'Editor', [
    'read',
    'create',
    'update',
])->description('Editor users have the ability to read, create, and update.');

role(string $key, string $name, array $permissions)

Available Jetstream Features

Jetstream comes with 3 deafult featurs:

Features::profilePhotos(), // add ability to have profile pictures
Features::api(), // add ability to generate api tokens
Features::teams(), // add ability to have teams

Enable/Disable Jetstream Features

To enable or disable Jetstream Features you just need to open your jetstream.php config file, and comment or uncomment the features on features

'features' => [
    Features::profilePhotos(),
    Features::api(),
    Features::teams(),
]

About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

Laravel is accessible, powerful, and provides tools required for large, robust applications.

Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

If you don't feel like reading, Laracasts can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Patreon page.

Premium Partners

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [email protected]. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.