bastinald

Member Since 1 Month Ago

Experience Points
250
Total
Experience

4,750 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

  • Community Pillar

    Earned once your experience points ranks in the top 10 of all Laracasts users.

Level 1
250 XP
May
27
2 weeks ago
Activity icon

Started a new Conversation Malzahar: A Magic PHP Framework. Build Reactive Web Apps Without Writing HTML, CSS, Or JavaScript! Powered By Tailwind, Alpine, Laravel, & Livewire.

I just released a new Laravel package. The concept behind it is to use PHP for everything, so you no longer have to write HTML, CSS, or JavaScript. No more constant file and context switching. It also allows you to create and use components in the same way you would with JavaScript libraries like React or Vue.

It's called Malzahar. A magic PHP framework. Build reactive web apps without writing HTML, CSS, or JavaScript! Powered by Tailwind, Alpine, Laravel, & Livewire.

Thanks for checking it out.

May
20
3 weeks ago
Activity icon

Started a new Conversation Bastinald/ui: Laravel + Livewire + Bootstrap 5 UI Starter Kit

I just launched my new UI package.

bastinald/ui allows you to create web apps using Laravel Livewire + Bootstrap 5 in record time.

Links

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

Thanks for checking it out.

May
11
1 month ago
Activity icon

Started a new Conversation Bastinald/laravel-livewire-auth: Laravel Starter Kit With Livewire & Bootstrap 5 Auth Scaffolding.

https://github.com/bastinald/laravel-livewire-auth

Laravel Livewire Auth

Laravel starter kit with Livewire & Bootstrap 5 auth scaffolding.

Requirements

  • NPM

Installation

Create a new Laravel app:

laravel new my-app

Configure your .env app, database, and mail values:

APP_*
DB_*
MAIL_*

Require this package via composer:

composer require bastinald/laravel-livewire-auth

Usage

Run the make:auth command to generate scaffolding:

php artisan make:auth

This will create the Livewire components and install Bootstrap 5.

May
09
1 month ago
Activity icon

Started a new Conversation Bastinald/laravel-livewire-modals: Dynamic Laravel Livewire Bootstrap 5 Modals.

https://github.com/bastinald/laravel-livewire-modals

Laravel Livewire Modals

Dynamic Laravel Livewire Bootstrap 5 modals.

Requirements

  • Bootstrap 5

Installation

Require the package:

composer require bastinald/laravel-livewire-modals

Add the livewire:modals component to your app layout view:

<livewire:scripts/>
<livewire:modals/>
<script src="{{ asset('js/app.js') }}"></script>

Require ../../vendor/bastinald/laravel-livewire-modals/js/modals in your app javascript file:

require('@popperjs/core');
require('bootstrap');
require('../../vendor/bastinald/laravel-livewire-modals/js/modals');

Usage

Specify a title for the modal in your Livewire component (the body content for the modal comes from the render method):

class ProfileUpdate extends Component
{
    public $title = 'Update Profile';

    public function render()
    {
        return view('profile-update');
    }
}

Show the modal via $emit('showModal', 'component-alias'):

<button type="button" 
    wire:click="$emit('showModal', 'profile-update')">
    {{ __('Update Profile') }}
</button>

You can also pass parameters to the component mount method:

<button type="button" 
    wire:click="$emit('showModal', 'user-update', {{ $user->id }})">
    {{ __('Update User: ' . $user->name) }}
</button>

Hiding the currently open model can be done via $emit('hideModal'):

<button type="button" wire:click="$emit('hideModal')">
    {{ __('Close') }}
</button>
May
08
1 month ago
Activity icon

Started a new Conversation Bastinald/laravel-livewire-forms: Laravel Livewire Form Component With Declarative Bootstrap 5 Fields And Buttons.

https://github.com/bastinald/laravel-livewire-forms

Laravel Livewire Forms

Laravel Livewire form component with declarative Bootstrap 5 fields and buttons.

Requirements

  • Bootstrap 5

Installation

composer require bastinald/laravel-livewire-forms

Usage

Make a new form:

php artisan make:form users.create-user-form

Declare fields:

public function fields()
{
    return [
        Input::make('name', 'Name'),
        Input::make('email', 'Email')->type('email'),
        Input::make('password', 'Password')->type('password'),
    ];
}

Declare buttons:

public function buttons()
{
    return [
        Button::make('Create User')->click('createUser'),
        Button::make('Cancel', 'secondary')->url('/'),
    ];
}

Declare rules:

public function rules()
{
    return [
        'name' => ['required', 'string', 'max:255'],
        'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
        'password' => ['required', 'string', 'min:8'],
    ];
}

Declare an action:

public function createUser()
{
    $this->validate();

    User::create([
        'name' => $this->data('name'),
        'email' => $this->data('email'),
        'password' => Hash::make($this->data('password')),
    ]);

    return redirect('/');
}

Full Page Forms

Create a full page form by specifying a layout view and route to use:

class Login extends FormComponent
{
    protected $layout = 'layouts.guest';

    public function route()
    {
        return Route::get('/login', static::class)
            ->name('login')
            ->middleware('guest');
    }

The route method is made available by using my laravel-livewire-routes package.

Data Binding

Most fields allow you to change the way livewire binds data via helper methods that are chained to fields e.g.:

Input::make('name', 'Name'), // defaults to defer
Input::make('name', 'Name')->instant(), // bind on keyup 
Input::make('name', 'Name')->defer(), // bind on action 
Input::make('name', 'Name')->lazy(), // bind on change
Input::make('name', 'Name')->debounce(500), // bind after 500ms delay 

Sizing

Many fields also allow you to specify a size for the input e.g.:

Input::make('name', 'Name'), // defaults to normal sizing
Input::make('name', 'Name')->small(), // small sizing
Input::make('name', 'Name')->large(), // large sizing

Disabling

Some fields allow you to disable or set them to readonly, and even plaintext for inputs:

Input::make('name', 'Name')->disabled(),
Input::make('name', 'Name')->readonly(),
Input::make('name', 'Name')->plaintext(),

Helper Text

Specify helper text for a field by using the help method:

Input::make('name', 'Name')->help('Please tell us your name!'),

Available Fields

Arrayable ($name, $label = null)

An array of fields.

Arrayable::make('locations', 'Locations')->fields([
    Input::make('city')->placeholder('City'),
    Select::make('state')->placeholder('State')->options(['FL', 'TX']),
]),

Available methods: fields, help, disabled

Button ($label = 'Submit', $style = 'primary')

A button used for actions and links.

Button::make('Register')->click('register'),
Button::make('Already registered?', 'secondary')->route('login'),
Button::make('Go back home', 'link')->url('/'),

The $style parameter accepts a bootstrap button style e.g. primary, outline-secondary, link, etc. Use the block method to make a button full width.

Available methods: block, click, href, route, url

Checkbox ($name, $label)

A checkbox field.

Checkbox::make('accept', 'I accept the terms'),
Checkbox::make('accept', 'I accept')->help('Please accept our terms'),
Checkbox::make('active', 'This user is active')->switch(),

Use the switch method to style the checkbox as a switch.

Available methods: switch, help, instant, defer, lazy, debounce, disabled

Checkboxes ($name, $label = null)

An array of checkbox fields.

Checkboxes::make('colors', 'Colors')->options(['Red', 'Green', 'Blue']),

Available methods: options, switch, help, instant, defer, lazy, debounce, disabled

Color ($name, $label = null)

A color picker field.

Color::make('hair_color', 'Hair Color'),

Available methods: small, large, help, instant, defer, lazy, debounce, disabled, readonly

Conditional

A statement used to conditionally show fields.

Conditional::if($this->data('color') == 'green', [
    Input::make('green', 'Green'),
])->elseif($this->data('color') == 'blue', [
    Input::make('blue', 'Blue'),
])->else([
    Input::make('red', 'Red'),
]),

Available methods: if, elseif, else

DynamicComponent ($name, $attrs = [])

A field used to display dynamic third-party components.

DynamicComponent::make('honey'),
DynamicComponent::make('honey', ['recaptcha' => true]),

This would translate to <x-honey/> and <x-honey recaptcha="recaptcha"/> in your form.

File ($name, $label = null)

A file upload field.

File::make('avatar', 'Avatar'),
File::make('photos', 'Photos')->multiple(),
File::make('documents', 'Documents')->multiple()->disk('s3'),

Use the multiple method to allow multiple file uploads. Optionally specify the filesystem disk to use via the disk method (used for linking to files, defaults to the filesystem config default).

Available methods: disk, multiple, help, disabled

Input ($name, $label = null)

An input field.

Input::make('name', 'Name'),
Input::make('phone')->placeholder('Phone')->type('tel'),
Input::make('email', 'Email')->type('email')->large(),
Input::make('price', 'Price')->type('number')->append('$')->prepend('.00'),

The type method accepts a standard HTML input type. As with other inputs, use small or large to resize an input. Input fields also support appends/prepends, and even plaintext.

Available methods: small, large, help, instant, defer, lazy, debounce, disabled, readonly, placeholder, type, append, prepend, plaintext

Radio ($name, $label = null)

A radio field.

Radio::make('gender', 'Gender')->options(['Male', 'Female']),

Available methods: options, switch, help, instant, defer, lazy, debounce, disabled

Select ($name, $label = null)

A select dropdown field.

Select::make('color', 'Color')->options(['Red', 'Green', 'Blue']),
Select::make('color', 'Color')->options([
    '#ff0000' => 'Red',
    '#00ff00' => 'Green',
    '#0000ff' => 'Blue',
])->instant(),
Select::make('user_id', 'User')->options(User::pluck('name', 'id')->toArray()),

Available methods: options, small, large, help, instant, defer, lazy, debounce, disabled, placeholder

Textarea ($name, $label = null)

A textarea field.

Input::make('bio', 'Biography'),
Input::make('bio', 'Biography')->rows(5),

Available methods: small, large, help, instant, defer, lazy, debounce, disabled, readonly, placeholder, rows

View ($name, $data = [])

Used to render a custom Blade view inside the form.

View::make('custom-view', ['hello' => 'world']),