Laravel + Livewire + Bootstrap 5 UI starter kit.

Related tags

Starter Projects ui
Overview

bastinald/ui

Laravel + Livewire + Bootstrap 5 UI starter kit.

Requirements

  • Laravel 8
  • NPM

Features

  • Bootstrap 5 pre-configured
  • Textarea autosize
  • Floating input labels
  • Dynamic Livewire modals
  • FontAwesome icons
  • Full auth scaffolding
  • User avatars
  • Automatic password hashing
  • Automatic user timezones
  • Automatic Livewire component routing
  • Automatic model migrations
  • Automatic model fillables from database columns
  • Easy form data usage & validation
  • Login rate limiting
  • Honeypot & reCAPTCHA registration protection
  • Password forgot & reset functionality
  • Profile editing & password changing functionality
  • Simple app versioning
  • Logo, fav icon, & touch icons
  • PWA capabilities via a manifest
  • Commands for automatic migrations, making components & models
  • Components for inputs, buttons, dropdowns, links, & more

Installation

Create a new Laravel app:

laravel new my-app

Configure .env app, database, and mail values:

APP_*
DB_*
MAIL_*

Require this package via composer:

composer require bastinald/ui

Run the ui:install command:

php artisan ui:install

Once installation is complete, you can visit your app URL and login, register, edit your profile, etc. Check out the app/Components, app/Models, and resources/views folders to see some of the code that was generated for you.

Commands

Automatic Migrations

php artisan ui:migrate {--f} {--s} {--fs}

This will run the automatic migrations by comparing the migration methods of your models to the current database table structures and apply any necessary changes. Use the --f option for fresh, --s for seed, or --fs for both.

Making Components

php artisan ui:component {class} {--f}

This will generate a Livewire component. Use the --f option to make a full-page component with automatic routing included via a route method.

Making Models

php artisan ui:model {class}

This will generate an Eloquent model including a migration and definition method for use with the ui:migrate command. It also creates a factory for the model.

Components

Box

<x-ui::box col="5">
    <h5>@yield('title')</h5>

    <p class="mb-0">You are logged in!</p>
</x-ui::box>

A content box.

  • col - the column width of the box (omit for full-width)
  • slot - can contain whatever you want

Button

<x-ui::button action="login" label="Login" block/>
<x-ui::button :href="route('login')" label="Login" color="light"/>
<x-ui::button action="login" icon="sign-in-alt" size="lg"/>

A button.

  • color - the Bootstrap button color (defaults to primary)
  • size - the Bootstrap button size (accepts lg or sm)
  • block - makes the button full-width
  • action - the Livewire action when the button is clicked
  • icon - the FontAwesome icon name for the button (e.g. cog)
  • label - the label for the button

Check

<x-ui::check label="Remember me" data="remember"/>

A checkbox input. Use WithData in your Livewire component for this.

  • data - the Livewire data binding key
  • lazy - bind the data on change
  • defer - bind the data on action (default)
  • label - the label for the checkbox

Dropdown

<x-ui::dropdown icon="link" label="A Dropdown">
    <x-ui::dropdown-item action="doSomething" icon="check" label="Do Something"/>
    <x-ui::dropdown-item :href="route('somewhere')" label="Go Somewhere"/>
</x-ui::dropdown>

A dropdown button.

  • color - the Bootstrap button color (defaults to primary)
  • size - the Bootstrap button size (accepts lg or sm)
  • block - make the dropdown full-width
  • icon - the FontAwesome icon name for the button (e.g. cog)
  • label - the label for the button
  • slot - should contain dropdown-item and dropdown-header

Dropdown Header

<x-ui::dropdown-header label="A Dropdown Header"/>

A dropdown header.

  • label - the label for the header

Dropdown Item

<x-ui::dropdown-item action="doSomething" icon="check" label="Do Something"/>
<x-ui::dropdown-item :href="route('somewhere')" label="Go Somewhere"/>

A dropdown item.

  • action - the Livewire action when the item is clicked
  • icon - the FontAwesome icon name for the item (e.g. cog)
  • label - the label for the item

Image

<x-ui::image label="Avatar" data="avatar"/>

An image upload input. Use WithData and WithFileUploads in your Livewire component for this.

  • data - the Livewire data binding key
  • label - the label for the input

Input

<x-ui::input type="email" label="Email Address" data="email"/>

An input field. Use WithData in your Livewire component for this.

  • data - the Livewire data binding key
  • instant - bind the data on keyup
  • lazy - bind the data on change
  • debounce - bind the data on debounce (ms)
  • defer - bind the data on action (default)
  • label - the label for the input

Link

<x-ui::link :href="route('login')" label="Login to account"/>
<x-ui::link action="doSomething" label="Do something else"/>

A link.

  • action - the Livewire action when the link is clicked
  • icon - the FontAwesome icon name for the link (e.g. cog)
  • label - the label for the link

Nav Dropdown

<x-ui::nav-dropdown icon="user">
    <x-ui::dropdown-item action="$emit('showModal', 'auth.profile-edit')" label="Edit Profile"/>
    <x-ui::dropdown-item action="$emit('showModal', 'auth.password-change')" label="Change Password"/>
    <x-ui::dropdown-item :href="route('logout')" label="Logout"/>
</x-ui::nav-dropdown>

A nav dropdown button.

  • icon - the FontAwesome icon name for the button (e.g. cog)
  • label - the label for the button
  • slot - should contain dropdown-item and dropdown-header

Nav Item

<x-ui::nav-item :href="route('login')" label="Login"/>
<x-ui::nav-item action="doSomething" icon="link"/>

A nav item button.

  • action - the Livewire action when the button is clicked
  • icon - the FontAwesome icon name for the button (e.g. cog)
  • label - the label for the button

Radio

<x-ui::radio :options="['Red', 'Green', 'Blue']" data="color"/>
<x-ui::radio :options="['#ff0000' => 'Red', '#00ff00' => 'Green', '#0000ff' => 'Blue']" data="color"/>
<x-ui::radio :options="App\Models\User::pluck('name', 'id')->toArray()" data="user_id"/>

A radio input. Use WithData in your Livewire component for this.

  • options - an array of radio options ($value => $label)
  • data - the Livewire data binding key
  • lazy - bind the data on change
  • defer - bind the data on action (default)

Select

<x-ui::select :options="['Red', 'Green', 'Blue']" label="Color" data="color"/>
<x-ui::select :options="['#ff0000' => 'Red', '#00ff00' => 'Green', '#0000ff' => 'Blue']" label="Hex Color" data="hex_color"/>
<x-ui::select :options="App\Models\User::pluck('name', 'id')->toArray()" label="User ID" data="user_id"/>

A select input. Use WithData in your Livewire component for this.

  • options - an array of select options ($value => $label)
  • data - the Livewire data binding key
  • lazy - bind the data on change
  • defer - bind the data on action (default)
  • label - the label for the select

Textarea

<x-ui::textarea label="Biography" data="email"/>

An autosized textarea field. Use WithData in your Livewire component for this.

  • data - the Livewire data binding key
  • instant - bind the data on keyup
  • lazy - bind the data on change
  • debounce - bind the data on debounce (ms)
  • defer - bind the data on action (default)
  • label - the label for the textarea

Dynamic Modals

Dynamic modals are Livewire components that are showed inside of modals dynamically when the showModal event is emitted.

For example, the App\Components\Auth\PasswordChange Livewire component:

namespace App\Components\Auth;

class PasswordChange extends Component
{
    use WithData;
    
    public function render()
    {
        return view('auth.password-change');
    }

The auth.password-change view:

<div>
    <h5>Change Password</h5>

    <x-ui::input type="password" label="Current Password" data="current_password"/>
    <x-ui::input type="password" label="New Password" data="password"/>
    <x-ui::input type="password" label="Confirm New Password" data="password_confirmation"/>

    <div class="d-flex gap-3">
        <x-ui::button action="$emit('hideModal')" label="Cancel" color="secondary" block/>
        <x-ui::button action="save" label="Save" block/>
    </div>
</div>

Showing Modals

Show a component inside of a modal via it's Livewire class alias e.g. auth.password-change:

<x-ui::dropdown-item action="$emit('showModal', 'auth.password-change')" label="Change Password"/>

You can also show modals via your Livewire components:

$this->emit('showModal', 'auth.password-change');

Hiding Modals

Hide the currently open modal by emitting the hideModal event:

<x-ui::button action="$emit('hideModal')" label="Cancel" color="secondary" block/>

Or, hide the modal via your Livewire components:

$this->emit('hideModal');

Modal Parameters

Pass parameters to your modal component mount method the same way you would with regular Livewire components:

<x-ui::button action="$emit('showModal', 'edit-user', {{ $user->id }})" label="Edit User"/>

The mount method for your Livewire component would look something like this:

class EditUser extends Component 
{
    public $user;
    
    public function mount(User $user)
    {
        $this->user = $user;
    }
}

Notice how even automatic model binding works.

Traits

HasFillable

Sets an Eloquent model $fillable to be equal to the model database table column names.

HasPassword

Automatically hashes an Eloquent model password attribute if it is not empty and not already hashed.

WithData

Makes dealing with form data easier by adding a $data array property to a Livewire component. This array is used by the package UI components such as inputs, selects, textarea's, etc.

Validating Data

use WithData;

public function rules()
{
    return [
        'email' => 'required|email',
        'password' => 'required',
    ];
}

public function login()
{
    $this->validateData();

    //
}

The validateData method validates current data.

Getting Data

Auth::user()->update($this->getData());
$this->getData('avatar');
$this->getData(['email', 'password']);

The getData method gets data by its key. If the key is an array, it will return an array of all data with the given keys. Omit the key entirely to return an array of all current data. Dot notation for the key is supported.

Setting Data

$this->setData(Auth::user()->toArray());
$this->setData('email', $email);

Sets data using a key and value. If the key is an array, it will set data values per array key.

hasUploadedData

if ($this->hasUploadedData('avatar')) {
    $avatar = $this->getData('avatar');
    $path = $avatar->hashName('avatars');

    Storage::put($path, Image::make($avatar)->fit(100)->encode());

    $this->setData('avatar', $path);
}

Checks to see if the current data for a given key is an uploaded file. Be sure to use this alongside WithFileUploads.

Comments
  • Feature Request: Searchable/Filterable Tables

    Feature Request: Searchable/Filterable Tables

    I really like your coding style and everything appears to be very straightforward to use. Great documentation too. Only thing I have left that i really need is a solid livewire table option for BS5. The only one that I know of is https://github.com/rappasoft/laravel-livewire-tables, which isnt bad, but from what i have seen from your packages so far, yours would be even more flexible and easier to use. Have anything in the works?

    opened by MACscr 13
  • Possible Seed bug when ran with flush?

    Possible Seed bug when ran with flush?

    It appears that when running ui:migrate --fs everything appears to run and i get success messages for both, but then looking at the tables, the seeds never run. It isn't until i run the --s on its own where it finally spits out an error. Guess it doesn't like enum types, but thats a whole other matter and maybe i will just not use them.

    opened by MACscr 8
  • Some Questions

    Some Questions

    Hey,

    i saw your video https://www.youtube.com/watch?v=CYl1pMgiecU and wrote a comment that i don't saw anymore so i write this issue for some questions.

    First, i already used https://github.com/bastinald/laravel-livewire-auth and it works some perfect and i will take a look at this too.

    But i have some questions before i will do this:

    1. I had several problems when i wanted to inject some service containers via dependency injection at the mount function. Is this here also a problem? Have i to use $this->emit('showModal', 'foo', $service) or can i inject these service directly via the mount function?
    2. Is there a way to save a migration log for the automatic migrations? I want to have some logs for these insteadof creating incremental migration files to have a sort of logging.
    3. i had one more question but i forgot it :D

    Greetings

    opened by elyday 4
  • Wanted to know which Laravel-Livewire Scaffolding to use

    Wanted to know which Laravel-Livewire Scaffolding to use

    Hi @bastinald ,

    Your repositories are awesome, welldone.

    Please let me know what is the difference between UI, Laravel-Livewire Scaffolding Starter kits (all reps that deal with basic starter kit laravel-livewire), or which I should use for my new project.

    Thanks.

    opened by saudashfaq 2
  • Can't publish ui stub

    Can't publish ui stub

    Good package to use . I need to customize login/register form but vendor:publish command fails. Can't locate path: <$project_directory\vendor\bastinald\ui\src\Providers/../../views> Help Needed !

    opened by manishlok 2
  • Feature Request: Component Folders

    Feature Request: Component Folders

    So as Im testing things and planning, in order to avoid my components and views directory roots from getting messy, it would be nice when creating the component to be able to do something like:

    php artisan ui:component Contacts\create -f

    or something that would automatically put that component into a its own folder. Reason I am asking for this is that each model will have a create, update, and index. Could even have a view if i decide to go that route. Thoughts on this or a better way to keep things organized?

    opened by MACscr 2
  • Default for Selects and such?

    Default for Selects and such?

    So i have the following setup to give me a nice list of states:

    <x-ui::select :options="App\Models\Contact::states()" label="State" />

    But how do I set a default selected state (Florida for example)? I don't see any default/selected options for selects.

    opened by MACscr 2
  • Sass depreciation notices on install

    Sass depreciation notices on install

    not a huge deal as exerything appears to work, but figured it would be a pretty quick update for you to resolve some of the deprecation warnings on install:

    
    Recommendation: math.div($value-diff * 100, $rfs-breakpoint)
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
        ╷
    231 │           $variable-width: #{$value-diff * 100 / $rfs-breakpoint}#{$variable-unit};
        │                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        ╵
        node_modules/bootstrap/scss/vendor/_rfs.scss 231:30       rfs-fluid-value()
        node_modules/bootstrap/scss/mixins/_utilities.scss 37:28  generate-utility()
        node_modules/bootstrap/scss/utilities/_api.scss 30:11     @import
        node_modules/bootstrap/scss/bootstrap.scss 51:9           @import
        vendor/bastinald/ui/resources/scss/ui.scss 26:9           @import
        resources/scss/app.scss 2:9                               root stylesheet
    
    DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
    
    Recommendation: math.div(1, $rfs-rem-value)
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
        ╷
    208 │         $value: $value / ($value * 0 + if($unit == px, 1, 1 / $rfs-rem-value));
        │                                                           ^^^^^^^^^^^^^^^^^^
        ╵
        node_modules/bootstrap/scss/vendor/_rfs.scss 208:59       rfs-fluid-value()
        node_modules/bootstrap/scss/mixins/_utilities.scss 37:28  generate-utility()
        node_modules/bootstrap/scss/utilities/_api.scss 30:11     @import
        node_modules/bootstrap/scss/bootstrap.scss 51:9           @import
        vendor/bastinald/ui/resources/scss/ui.scss 26:9           @import
        resources/scss/app.scss 2:9                               root stylesheet
    
    DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
    
    Recommendation: math.div($value, $value * 0 + if($unit == px, 1, 1 / $rfs-rem-value))
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
        ╷
    208 │         $value: $value / ($value * 0 + if($unit == px, 1, 1 / $rfs-rem-value));
        │                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        ╵
        node_modules/bootstrap/scss/vendor/_rfs.scss 208:17       rfs-fluid-value()
        node_modules/bootstrap/scss/mixins/_utilities.scss 37:28  generate-utility()
        node_modules/bootstrap/scss/utilities/_api.scss 30:11     @import
        node_modules/bootstrap/scss/bootstrap.scss 51:9           @import
        vendor/bastinald/ui/resources/scss/ui.scss 26:9           @import
        resources/scss/app.scss 2:9                               root stylesheet
    
    DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
    
    Recommendation: math.div($value, $rfs-rem-value)
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
        ╷
    212 │           $val: $val + ' ' +  if($rfs-unit == rem, #{$value / $rfs-rem-value}rem, #{$value}px);
        │                                                      ^^^^^^^^^^^^^^^^^^^^^^^
        ╵
        node_modules/bootstrap/scss/vendor/_rfs.scss 212:54       rfs-fluid-value()
        node_modules/bootstrap/scss/mixins/_utilities.scss 37:28  generate-utility()
        node_modules/bootstrap/scss/utilities/_api.scss 30:11     @import
        node_modules/bootstrap/scss/bootstrap.scss 51:9           @import
        vendor/bastinald/ui/resources/scss/ui.scss 26:9           @import
        resources/scss/app.scss 2:9                               root stylesheet
    
    DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
    
    Recommendation: math.div(1, $rfs-rem-value)
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
        ╷
    208 │         $value: $value / ($value * 0 + if($unit == px, 1, 1 / $rfs-rem-value));
        │                                                           ^^^^^^^^^^^^^^^^^^
        ╵
        node_modules/bootstrap/scss/vendor/_rfs.scss 208:59       rfs-fluid-value()
        node_modules/bootstrap/scss/mixins/_utilities.scss 37:28  generate-utility()
        node_modules/bootstrap/scss/utilities/_api.scss 30:11     @import
        node_modules/bootstrap/scss/bootstrap.scss 51:9           @import
        vendor/bastinald/ui/resources/scss/ui.scss 26:9           @import
        resources/scss/app.scss 2:9                               root stylesheet
    
    DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
    
    Recommendation: math.div($value, $value * 0 + if($unit == px, 1, 1 / $rfs-rem-value))
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
        ╷
    208 │         $value: $value / ($value * 0 + if($unit == px, 1, 1 / $rfs-rem-value));
        │                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        ╵
        node_modules/bootstrap/scss/vendor/_rfs.scss 208:17       rfs-fluid-value()
        node_modules/bootstrap/scss/mixins/_utilities.scss 37:28  generate-utility()
        node_modules/bootstrap/scss/utilities/_api.scss 30:11     @import
        node_modules/bootstrap/scss/bootstrap.scss 51:9           @import
        vendor/bastinald/ui/resources/scss/ui.scss 26:9           @import
        resources/scss/app.scss 2:9                               root stylesheet
    
    DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
    
    Recommendation: math.div($value, $rfs-rem-value)
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
        ╷
    212 │           $val: $val + ' ' +  if($rfs-unit == rem, #{$value / $rfs-rem-value}rem, #{$value}px);
        │                                                      ^^^^^^^^^^^^^^^^^^^^^^^
        ╵
        node_modules/bootstrap/scss/vendor/_rfs.scss 212:54       rfs-fluid-value()
        node_modules/bootstrap/scss/mixins/_utilities.scss 37:28  generate-utility()
        node_modules/bootstrap/scss/utilities/_api.scss 30:11     @import
        node_modules/bootstrap/scss/bootstrap.scss 51:9           @import
        vendor/bastinald/ui/resources/scss/ui.scss 26:9           @import
        resources/scss/app.scss 2:9                               root stylesheet
    
    DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
    
    Recommendation: math.div(20em, 16)
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
       ╷
    12 │ $fa-fw-width:          (20em / 16);
       │                         ^^^^^^^^^
       ╵
        node_modules/@fortawesome/fontawesome-free/scss/_variables.scss 12:25  @import
        node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss 5:9   @import
        vendor/bastinald/ui/resources/scss/ui.scss 27:9                        @import
        resources/scss/app.scss 2:9                                            root stylesheet
    
    DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
    
    Recommendation: math.div(4em, 3)
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
      ╷
    6 │   font-size: (4em / 3);
      │               ^^^^^^^
      ╵
        node_modules/@fortawesome/fontawesome-free/scss/_larger.scss 6:15     @import
        node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss 8:9  @import
        vendor/bastinald/ui/resources/scss/ui.scss 27:9                       @import
        resources/scss/app.scss 2:9                                           root stylesheet
    
    DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
    
    Recommendation: math.div(3em, 4)
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
      ╷
    7 │   line-height: (3em / 4);
      │                 ^^^^^^^
      ╵
        node_modules/@fortawesome/fontawesome-free/scss/_larger.scss 7:17     @import
        node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss 8:9  @import
        vendor/bastinald/ui/resources/scss/ui.scss 27:9                       @import
        resources/scss/app.scss 2:9                                           root stylesheet
    
    DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
    
    Recommendation: math.div($fa-li-width * 5, 4)
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
      ╷
    6 │   margin-left: $fa-li-width * 5/4;
      │                ^^^^^^^^^^^^^^^^^^
      ╵
        node_modules/@fortawesome/fontawesome-free/scss/_list.scss 6:16        @import
        node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss 10:9  @import
        vendor/bastinald/ui/resources/scss/ui.scss 27:9                        @import
        resources/scss/app.scss 2:9                                            root stylesheet
    
    DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
    
    Recommendation: math.div(20em, 16)
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
       ╷
    12 │ $fa-fw-width:          (20em / 16);
       │                         ^^^^^^^^^
       ╵
        node_modules/@fortawesome/fontawesome-free/scss/_variables.scss 12:25  @import
        node_modules/@fortawesome/fontawesome-free/scss/solid.scss 5:9         @import
        vendor/bastinald/ui/resources/scss/ui.scss 28:9                        @import
        resources/scss/app.scss 2:9                                            root stylesheet
    
    UI installed!```
    opened by MACscr 2
  • php artisan ui:migrate command fails on docker

    php artisan ui:migrate command fails on docker

    I'm using laradock to run the app.

        "require": {
            "php": "^8.0",
            "babenkoivan/telegram-notifications": "^1.1",
            "bastinald/ui": "^2.2",
            "diglactic/laravel-breadcrumbs": "^7.1",
            "fruitcake/laravel-cors": "^2.0",
            "guzzlehttp/guzzle": "^7.0.1",
            "intervention/image": "^2.7",
            "jantinnerezo/livewire-alert": "^2.2",
            "laravel/framework": "^8.75",
            "laravel/sanctum": "^2.11",
            "laravel/tinker": "^2.5"
        },
    

    I set the configs in .env file.

    DB_CONNECTION=mysql
    DB_HOST=mysql
    DB_PORT=3306
    DB_DATABASE=memor
    DB_USERNAME=memor
    DB_PASSWORD=memor
    

    throws this: image

    opened by parmonov98 1
  • how to extend updatedProperty from WithModel?

    how to extend updatedProperty from WithModel?

    when I change radio button I need to update company select options How can I catch the moment when model['role'] is changed and update companyOptions accordingly https://i.imgur.com/bK7QfeR.png

    opened by parmonov98 1
  • new feature needed pass an assoc array property to select component as options, not like a string.

    new feature needed pass an assoc array property to select component as options, not like a string.

    <x-ui::select :label="__('Color')" :options="['Red', 'Blue']" model="color"/>

    What I want is to pass an assoc array and the select component should parse it automatically

    $managers = User::where('role', 'manager')->get(['id', 'name']);
    
    $arr = [];
    $managers->map(function ($item) use (&$arr){
        $arr[$item->id] = $item->name;
    });
    
    $this->managerOptions = $arr;
    

    use it in view like this <x-ui::select :label="__('Manager')" :options="managerOptions" model="manager_id"/>

    thanks

    opened by parmonov98 1
  • Migration Error

    Migration Error

    When running php artisan ui:migrate, I get the following error: "An exception occurred while executing a query: SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation "temp_users_email_verified_at_index" already exists"

    opened by ChefBrett 1
Owner
null
A Laravel Starter Kit for Laravel. Built with Laravel 8.

Laravel Get Started Project Laravel Get Started Project is a basic crud app built with laravel 8. In this app a basic product crud created. Features i

Nazmul Hasan Robin 8 Nov 24, 2022
React laravel starter kit with tailwind css and vite js(laravel 9)

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Jerald Tonmoy Dias 2 Dec 23, 2022
Laravel API starter Kit will provide you with the tools for making API's that everyone will love

Laravel API Starter Kit Laravel API starter Kit will provide you with the tools for making API's that everyone will love, API Authentication is alread

Jose Luis Fonseca 400 Dec 29, 2022
a free, open-source dashboard panel starter kit for Laravel

QAdmin a free, open-source dashboard panel starter kit for Laravel. Just intall and everything is ready Tech Stack Client: ruangAdmin, Bootstrap, Jque

null 30 Oct 11, 2022
A simple starter kit for using TypedCMS with the Laravel framework.

TypedCMS Starter Kit for Laravel Our stater kits are tailored solutions for each platform, unlike the simple API wrappers offered by other vendors. Th

TypedCMS 1 Nov 20, 2021
Laravel React Webpack Starter Kit

About Laravel Laravel React Webpack Starter Kit This starter kit is designed to get you up and running with with react.js with Laravel, built on top o

Biju Nakarmi 32 Nov 24, 2022
👔 Enterprise Web application starter kit or template using Laravel

Laravel Enterprise Starter Kit (LESK) Description LESK, is a template project based on the Laravel LTS, combining a set of features that can kick star

Sebastien Routier 1 Dec 31, 2020
A Laravel-Nuxt starter kit.

Laravel-Nuxt A Laravel-Nuxt starter project template. Features Nuxt 2 Laravel 8 SPA or SSR Socialite integration VueI18n + ESlint + Bootstrap 4 + Font

Cretu Eusebiu 1.1k Jan 5, 2023
A Laravel-Vue-Tailwind SAAS Starter Kit.

Super SAAS Template My name is Julien Nahum, I've founded multiple Software-As-A-Service companies. This repo is the base I'm using to create a new SA

Julien Nahum 16 Dec 23, 2022
A Laravel-Vue SPA starter kit.

Laravel-Vue SPA A Laravel-Vue SPA starter kit. Features Laravel 8 Vue + VueRouter + Vuex + VueI18n + ESlint Pages with dynamic import and custom layou

Cretu Eusebiu 3k Jan 6, 2023
A starter kit that integrates Laravel with Vue CLI, Inertia.js, TailwindCSS and Vuetify

Laravel Viltify Laravel Viltify is a heavily opinionated Laravel starter kit. It's intent is to seamlessly integrate V ue, I nertia.js, L aravel, T ai

Matheus Dal'Pizzol 50 Jan 4, 2023
An administration starter kit for Laravel.

Craftable About Demo Packages used Requirements Installation New project Add to existing project Basics Documentation Where to go next? About Hi Craft

BRACKETS 862 Jan 4, 2023
It's a dashboard theme/UI-Starter Kit with Laravel, Inertia and Vue (JetStream).

TailAdmin Inertia It's a dashboard theme/UI-Starter Kit with Laravel, Inertia and Vue (JetStream). Setup Directions npm install composer install Chang

Sinan AYDOĞAN 121 Dec 31, 2022
Laravel Boilerplate / Starter Kit with Gentelella Admin Theme

Laravel Boilerplate Project Laravel Boilerplate provides a very flexible and extensible way of building your custom Laravel applications. Table of Con

Labs64 848 Dec 28, 2022
An implementing of the Laravel Breeze application / authentication starter kit frontend in Next.js

Windmill with Laravel Breeze as Backend API Introduction This repository is an implementing of the Laravel Breeze application / authentication starter

ROKET ID 17 Nov 18, 2022
Surf, an opinionated fork of Wave - the SAAS starter kit, with Laravel 9.

Surf ??‍♀️ Introduction Surf, the opinionated Software as a Service Starter Kit that can help you build your next great idea ?? . Surf is fork off Wav

Kim Hallberg 14 Oct 6, 2022
This is a laravel Auth Starter Kit, with full user/admin authentication with both session and token auth

About Auth Starter It's a Laravel 8 authentication markdown that will help you to understand and grasp all the underlying functionality for Session an

Sami Alateya 10 Aug 3, 2022
An Starter Kit For Laravel Projects.

Laravel Starter Kit An Starter Kit For Laravel Projects. Installation 1-Install the package via composer: composer require xmen/starter-kit --with-al

4xmen 16 Jun 15, 2023
Wave - The Software as a Service Starter Kit, designed to help you build the SAAS of your dreams 🚀 💰

Introduction Wave is a Software as a Service Starter Kit that can help you build your next great idea ?? . Wave is built with Laravel, Voyager, Tailwi

null 4.2k Jan 4, 2023