jimb814

Member Since 2 Months Ago

Experience Points
7,180
Total
Experience

2,820 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
64
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 2
7,180 XP
Jan
20
4 days ago
Activity icon

Replied to Peculiar Livewire Behavior

Excellent work! That's exactly what was happening!

Activity icon

Replied to Peculiar Livewire Behavior

In the livewire view, I commented out the form and the duplication stopped, so I replaced this:

<li>

    <form class="inline" action="/users/delete/{{ $user->id }}" method="POST">
        @csrf
        <input type="hidden" name="id" value="{{ $user->id }}">
        <button
            type="button"
            class="bg-white-200 text-gray-700 rounded-md px-2 py-1 m-1 transition duration-500 ease hover:bg-red-700 hover:text-white">
            Delete
        </button>
    </form>
</li>

with this:

<li>
    <a 
        class="bg-white-200 text-gray-700 rounded-md px-2 py-1 m-1 transition duration-500 ease hover:bg-red-700 hover:text-white"
        href="/users/delete/{{ $user->id }}">
        Delete
    </a>

Now the duplication has ceased. I have no clue why this was happening. Thanks to everyone who gave this problem a look.

Activity icon

Replied to Peculiar Livewire Behavior

Thanks @devingray_ . Yes, it persists.

Activity icon

Started a new Conversation Peculiar Livewire Behavior

I built a users-table with an action column to edit or delete a record. As characters are entered into the search input, the "delete" button multiplies; sometimes once for each character entered. Everything works as expected, otherwise.

I cannot determine if it's possible to upload a screenshot to show this. Any ideas what might cause this?

Component:

<?php

namespace App\Http\Livewire;

use App\Models\User;
use Livewire\Component;
use Livewire\WithPagination;

class UsersTable extends Component
{
    use WithPagination;
    
    public $search = '';
    public $perPage = 10;
    public $orderDirection = true;  // DESC = true
    public $orderBy = 'id';

    public function updatingSearch()
    {
        $this->resetPage();
    }
    
    public function render()
    {
        $query = '%'.$this->search.'%';

        return view('livewire.users-table', [
            'users' => User::where('first_name', 'like', $query)
                ->orWhere('last_name', 'like', $query)
                ->orWhere('email', 'like', $query)
                ->orWhere('role', 'like', $query)
                ->orderBy($this->orderBy, $this->orderDirection ? 'DESC' : 'ASC')
                ->paginate($this->perPage)
        ]);
    }
}

Action options in view:

<td class="w-full lg:w-auto p-1 text-gray-800 text-center border border-b block lg:table-cell relative lg:static">
                        <div>
                            <a 
                                class="bg-white-200 text-gray-700 rounded-md px-2 py-1 m-1 hover:no-underline transition duration-500 ease  hover:bg-blue-400 hover:text-white"
                                href="/users/{{ $user->id }}/edit">
                                Edit
                            </a>
                            <form style="display:inline;" action="/users/delete/{{ $user->id }}" method="POST">
                                @csrf
                                <input type="hidden" name="id" value="{{ $user->id }}">
                                <button
                                    type="button"
                                    class="bg-white-200 text-gray-700 rounded-md px-2 py-1 m-1 transition duration-500 ease hover:bg-red-700 hover:text-white">
                                    Delete
                                </button>
                            </form>
                        </div>
                    </td>

Here's the search input:

<input 
      wire:model.debounce.300ms="search"
      type="search"
       class="appearance-none block w-full bg-blue-100 border border-gray-300 text-gray-700 rounded py-3 px-4 leading-tight focus:outline-none"
       placeholder="Search users..."
       autocomplete="off">
Jan
06
2 weeks ago
Activity icon

Replied to Translating SQL Into Query Builder Syntax

Thanks @michaloravec! Thank you! It works!

Activity icon

Started a new Conversation Translating SQL Into Query Builder Syntax

I am struggling to grasp how to write these kinds of queries in Laravel.

This works fine:

SELECT * 
FROM `messages` 
JOIN `conversations`
ON messages.conversation_id = conversations.id
WHERE sent_to = 6 AND created_by = 3
OR 
created_by = 6 AND sent_to = 3;

This returns nothing:

public function getConversationBetween($user_id, $auth_id)
{
     return DB::table('conversations')
         ->join('messages', 'messages.conversation_id', '=', 'conversations.id')
         ->where(function($query) use ($auth_id, $user_id) { 
             $query->where('messages.sent_to', $auth_id)->orWhere('messages.created_by', $user_id);
         })
         ->where(function ($query) use ($user_id, $auth_id) {
             $query->where('messages.created_by', $auth_id)->orWhere('messages.sent_to', $user_id);
         })  
         ->get(); 
}

I would really appreciate understanding the correct way to write this query for Laravel. Any assistance is appreciated!

Jan
03
3 weeks ago
Activity icon

Replied to How To Do A Query In Laravel

This works:

$sender_id = $request->sender_id;
$receiver_id = $request->receiver_id;

$conversation = Conversation::where(function ($query) use ($sender_id, $receiver_id) {
            $query->where('sender_id', $sender_id,)->where('receiver_id', $receiver_id);
        })->orWhere(function ($query) use ($sender_id, $receiver_id) {
            $query->where('sender_id', $receiver_id)->where('receiver_id', $sender_id);
        })
        ->get();
Activity icon

Replied to How To Do A Query In Laravel

Do you mean like this:

 $conversation = DB::table('conversations')
            ->where(function($query) use ($request) {
                $query->where('sender_id', $request->sender_id)
                    ->where('receiver_id', $request->receiver_id)
            });
            ->orWhere(function($query) use ($request) {
                $query->where('receiver_id', $request->sender_id)
                    ->where('sender_id', $request->receiver_id)
            });
            ->get();
Activity icon

Replied to How To Do A Query In Laravel

Thank @fylzero. I modified this to include $request based on @kevinbui's modification of his code, but it is still throwing an error:

syntax error, unexpected '}'

The code looks correct to me, however. Any idea what might be incorrect?

$conversation = DB::table('conversations')
            ->where(function($query) use ($request) {
                $query->where('sender_id', $request->sender_id)
                    ->where('receiver_id', $request->receiver_id)
            })
            ->orWhere(function($query) use ($request) {
                $query->where('receiver_id', $request->sender_id)
                    ->where('sender_id', $request->receiver_id)
            })
            ->get();
Activity icon

Replied to How To Do A Query In Laravel

Thanks @kevinbui. I'm getting the sender_id and receiver_id values from a form submission and attempting to use $request-> to pass them, but it's throwing an error that request is not defined. I passed it in the function to see if that works, but it threw another error. Apparently, it's not being recognized inside the function. Any idea why?

$conversation = Conversation::where(function ($query) {
            $query->where('sender_id', $request->sender_id)->where('receiver_id', $request->receiver_id);
        })->orWhere(function ($query) {
            $query->where('sender_id', $request->receiver_id)->where('receiver_id', $request->sender_id);
        });
Activity icon

Started a new Conversation How To Do A Query In Laravel

I have been unable to find an answer in the Laravel docs. I am using Laravel 8.

I have a conversations table with two fields that I want to check: sender_id and receiver_id.

Table:

Schema::create('conversations', function (Blueprint $table) {
            $table->id();
            $table->integer('sender_id');
            $table->integer('receiver_id');
            $table->timestamps();
});

I want to find out if a conversation between two users already exists. Since a user can be a sender or a receiver, the query must check using AND and OR.

Here's the query in SQL:

SELECT * 
FROM `conversations` 
WHERE sender_id = 3 AND receiver_id = 6 
OR receiver_id = 6 AND sender_id = 3;

I would appreciate any assistance.

Dec
28
3 weeks ago
Activity icon

Replied to Jetstream/Livewire Slots On Layout Pages

Not sure if this should be a separate question. If so, please advise and I will submit it separately. My struggles parallel what @lordbedwetter describes -- drinking from the fire hose in the attempt to understand what is leading edge rather than learning "old" stuff.

I copied layouts/app.blade.php and named it master.blade.php.

I then changed dashboard.blade.php like this:

<x-master-layout>

    <x-slot name="header">
        <h2 class="font-semibold text-xl text-gray-800 leading-tight">
            {{ __('My Dashboard') }}
        </h2>
    </x-slot>


    <div class="py-12">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
            <div class="bg-white overflow-hidden shadow-xl sm:rounded-lg">

                <x-jet-welcome />

            </div>
        </div>
    </div>

</x-master-layout>

I expected it to work after earlier changing

<x-app-layout> 

...

</x-app-layout>

to

<x-guest-layout> 

...

</x-guest-layout>

without throwing an error (guest.blade.php is part of the scaffolding).

However, when I changed it to

<x-master-layout> 
...

</x-master-layout>

which was an identical copy of app.blade.php, it threw an error:

InvalidArgumentException Unable to locate a class or view for component [master-layout].

Any idea why this fails?

I might be mistaken, but I feel pressure, especially being new to Laravel, to embrace components no matter how much suffering is involved.

Dec
27
4 weeks ago
Activity icon

Commented on Datatables

My query is not working. If I hard-code the search value it works, however. So, I verified that the input was passing the data to the Controller by displaying in the blade template.

This does not work:

class DataTables extends Component
{
    // Pagination links do not work if below is uncommented 
    // use WithPagination;

    public $search;

    protected $paginationTheme = 'bootstrap';
   
    
    public function render()
    {
        return view('livewire.data-tables', [
            'contacts' => Contact::where('first_name', 'like', '%'.$this->search.'%')
                ->paginate(10)
        ]);
    }
}

This works: hard-coding $search value

 public $search = 'dana';

    
    public function render()
    {
        return view('livewire.data-tables', [
            'contacts' => Contact::where('first_name', 'like', '%'.$this->search.'%')
                ->paginate(10)
        ]);
    }

This also works: hard-coding query

public $search;

    
    public function render()
    {
        return view('livewire.data-tables', [
            'contacts' => Contact::where('first_name', 'like', '%'.'dana'.'%')
                ->paginate(10)
        ]);
    }

Here's the input:

<div class="row pb30">
    <div class="col-sm-4">
        <div class="form-group">
            <input 
                wire:model="search"
                class="form-control" 
                type="search"
                placeholder="Search..."
                autocomplete="off">

            <h4>{{ $search }}</h4>
        </div>
    </div>
</div>

The data is returning from the Controller because I am displaying it under the input. I don't see how I can include the screenshot.

I'm stuck, so if you can see an error, please let me know.

Thanks for your work!

Dec
13
1 month ago
Activity icon

Replied to How To Query The Database When User Logs In

@snapey Thanks for your input. I have an alarm bell icon to display if unread messages exist. This community of support is great!

Activity icon

Replied to How To Query The Database When User Logs In

@michaloravec Thanks! I'll check into that option.

Activity icon

Replied to How To Query The Database When User Logs In

@siangboon Thanks! I'll check them out.

Activity icon

Replied to How To Query The Database When User Logs In

@jlrdw Thanks for the super speedy reply! The RouteServiceProvider redirects to /, and web.php assigns the HomeController to that route. Does that mean that I do this in [email protected]?

Activity icon

Started a new Conversation How To Query The Database When User Logs In

I am new to Laravel. I have two types of users. I have a messages table that I want to query for unread messages when the user logs in.

I like the login functionality Laravel provides out-of-the-box, but I do not know where to put a query, or if this is even a good idea because there are better ways to handle it.

If anyone can help point me in the right direction, I would appreciate it.

Dec
01
1 month ago
Activity icon

Replied to How To Use API To Insert Data From One Application Into The DB Of Another Application

I resolved the issue. I am running XAMPP in Windows.

Solution: C:\Windows\System32\drivers\etc\hosts was modified where the value of 127.0.0.1 was set to App1.

Explanation: My server is setup to allow opening several projects from htdocs with the extension .localhost. I did not know that using php artisan server that you can open multiple apps by assigning different ports. In attempting to solve another issue a few days ago, I read somewhere that it was resolved by making this assignment. Because I made this change a few days ago and what was happening made no sense, I suspected this might be it. So using php artisan serve instead of Apache Server, I started App1 as 127.0.0.1:8000 and App2 as 127.0.0.1:8001.

I ran the code again and the data was inserted into the correct DB, App2's DB.

The code at the bottom of this file was changed like this, over-riding the code:

##################################

127.0.0.1	thepipeline.localhost

##################################

I changed it back by commenting out the line:

##################################

#127.0.0.1	thepipeline.localhost

##################################

Thanks to the 20+ folks in this community who read my explanation in the hopes of lending a helping hand.

Activity icon

Replied to How To Use API To Insert Data From One Application Into The DB Of Another Application

Thank you @bugsysha for your reply. There is no error because the code is successfully inserting data, but into the "wrong" DB. It doesn't make sense since the Controller doing the work is in another application (App2).

I thought using the Registrant model--Registrant::create($request->all());--means only that the data will be inserted into the Registrants table of App2 where the code is executed.

As far as specifying a second DB, are you suggesting something like this?

DB::table('registrants')->insert(
    [ array of key value pairs ]
);

Instead of this:

Registrant::create($request->all());

The URL in the postRequest() method in App1

$url = 'http://thepipeline.localhost/api/v1/registrants/store';

is an endpoint/route in App2. What new route in App2 to send data via some HTTP client are you referring?

The store() method in App2

public function store(Request $request)
{  
        $registrant = Registrant::create($request->all());
        return response()->json('Successfully added');
}

creates the new record, so how is it possible that it stores it in another DB?

I tested the API in Insomnia and it works as expected. I'm unsure if headers are required. I don't know how to send those or other critical data such as authorization, and other info the server might need. More fun is waiting for me.

I cannot rule out the idea that I am missing this entirely. Clarity doesn't seem possible except by way of confusion.

Activity icon

Started a new Conversation How To Use API To Insert Data From One Application Into The DB Of Another Application

I am new to Laravel. I am attempting to pass data from one application (App 1) to the database of another application (App 2). I am dizzy from the tutorials and articles I have studied on APIs and Laravel and Guzzle. I have managed to patch something together to create a new record, but it is inserted into the wrong database: App 1's DB instead of App 2's.

Route in web.php in App 1:

Route::get('post-registrant', [DataController::class, 'postRequest']);

postRequest() in DataController

public function postRequest(Request $request) 
    {
        $client = new \GuzzleHttp\Client();
        $url = 'http://thepipeline.localhost/api/v1/registrants/store';

        $form_params = [
            'email'             => '[email protected]',
            'first_name'    => 'John',
            'last_name'     => 'Smith',
              /. . . .
        ];

        $response = $client->post($url, ['form_params' => $form_params]);
        $response = $response->getBody()->getContents();
}

The $url value above is the route to the API in App 2.

http://thepipeline.localhost/api/v1/registrants/store

App 2 route in api.php

Route::post('v1/registrants/store', [RegistrantsController::class, 'store']);

store() in RegistrantsController in App 2

public function store(Request $request)
{
        $registrant = Registrant::create($request->all());
        return response()->json('Successfully added');
}

On my local machine, I have a DB for App 1 and a DB for App 2. The table I want to add the data into is App2.registrants but the data is being inserted into App1.registrants

If anyone can help identify what is wrong, if not everything, I'd appreciate it.

Nov
28
1 month ago
Activity icon

Replied to How Credentials /api Token Can Be Passed With A Form Submission To An API

Thanks @automica. Is this solution good in version 8? I noticed that the link is not active for version 8.

Activity icon

Started a new Conversation How Credentials /api Token Can Be Passed With A Form Submission To An API

I am new to Laravel. I am looking for direction as to how I can send data from a form submitted on Domain A, which I have access to, to Domain B where the User who owns Domain A is a registered user with an api_token field.

It seems like the form needs to pass a token invisibly to the endpoint that matches the token field in the users table. I have watched videos on building APIs in Laravel and have a basic understanding , as well as videos on JWT and Passport. The former didn’t address authentication and the latter the specific thing I’m trying to do.

I want to understand how credentials can be passed from the form to the endpoint and be authenticated. I would appreciate any direction.

Nov
27
1 month ago
Activity icon

Replied to Error Class 'Swift_StreamFilters_StringReplacementFilter' Not Found

File errors occurred during FTP upload to host server. Ran those commands and re-uploaded using FileZilla and over-writing files where the target already existed (several target files were empty). Code now works as expected. Thanks!

Nov
26
1 month ago
Activity icon

Replied to Error Class 'Swift_StreamFilters_StringReplacementFilter' Not Found

Thanks. Forge looks interesting. Do you know whether with Forge you can use the CLI?

Activity icon

Replied to Error Class 'Swift_StreamFilters_StringReplacementFilter' Not Found

I am wide open to better ways to do anything, so please share your deployment suggestions.

Activity icon

Replied to Error Class 'Swift_StreamFilters_StringReplacementFilter' Not Found

Thanks Bahyusanciko. The store function works except the Mail part, so it appears that my Internet connection is intact.

Activity icon

Replied to Error Class 'Swift_StreamFilters_StringReplacementFilter' Not Found

Thanks Snapey. The code was deployed to InMotion Hosting via FTP. It's a shared server account. I do not believe that I have access to a CLI in a shared server account. I do suspect that it's possible that something went wrong uploading 27,000 files because during debugging I found two files that were empty. It's my understanding that only a dedicated server account (expensive) has use of the CLI. Is that correct?

Activity icon

Replied to Error Class 'Swift_StreamFilters_StringReplacementFilter' Not Found

Thanks jlrdw. I was able to send an email using php mail(). Perhaps that rules out the host server as the problem. I opened an issue on Github: https://github.com/swiftmailer/swiftmailer/issues/1306

The mail settings appear correct:

MAIL_MAILER=smtp MAIL_HOST=secure279.inmotionhosting.com MAIL_PORT=465 MAIL_USERNAME=full_email_address MAIL_PASSWORD=password MAIL_ENCRYPTION=SSL MAIL_FROM_ADDRESS=full_email_address

This error was reported on laravel.io two years ago without a reply. https://laravel.io/forum/class-swift-streamfilters-stringreplacementfilter

Activity icon

Started a new Conversation Error Class 'Swift_StreamFilters_StringReplacementFilter' Not Found

I am new to Laravel.

I have encountered a dead-end. I posted the question on StackOverflow, and hopefully it's okay to post the link here in the hope that someone in the Laravel community might have a remedy.

Code that works fine on my machine using Mailtrap fails on InMotion Hosting's server. Something is wrong, I believe with my mail configurations, but at the same time they appear correct.

I was unable to find any solutions online and only one link of the same issue. It was posted but there were no replies. Any help is greatly appreciated.

https://stackoverflow.com/questions/65025862/laravel-mail-error-class-swift-streamfilters-stringreplacementfilter-not-foun

Activity icon

Replied to Email Settings

My .env is configured as suggested here, but I receive an error that I cannot resolve or find any assistance for online:

Class 'Swift_StreamFilters_StringReplacementFilter' not found 

When I comment out my mail code, everything works (contact info inserted into DB). What fails is emailing the data from the form saved like this:

$data = Contact::create($validatedAttributes);

Attempting to mail:

Mail::to(request('email'))
                ->send(new ContactForm($data));

The mailable instance:

class ContactForm extends Mailable
{
    use Queueable, SerializesModels;

    public $data;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($data)
    {
        $this->data = $data;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->markdown('emails.contact-form');
    }
}

The markdown template:

@component('mail::message')
# You received a contact form submission from {{ $data->first_name }}.

Here are the details: 
- Name: {{ $data->first_name }} {{ $data->last_name }}
- Email: {{ $data->email }}
- Message: {{ $data->message }}


Thanks,<br>
{{ config('app.name') }}
@endcomponent

Everything works in MailTrap but not on the server at InMotion Hosting. Any ideas on what I'm doing wrong?

Nov
18
2 months ago
Activity icon

Replied to Delete Notification

I am new to Laravel. I suspect that there are better ways to delete a notification, but here's what I was able to put together until I find a better way. The route is an attempt to use REST syntax, but I was only able to pass the notification ID by using a hidden input. I welcome any input on how to improve this.

Route:

Route::post('/notifications/delete/{id}', [UserNotificationsController::class, 'destroy'])->middleware('auth');

Method in UserNotificationsController:

public function destroy(Request $request) 
{
    $id = $request->input('id'); 

    auth()->user()->notifications()->where('id', $id)->delete();

    return redirect('/notifications')
        ->with('message', 'Notification deleted.');
}

View:

<div class="container pt80 pb200">
    <div class="row justify-content-center">
        <div class="col-sm-12">
            @if (session('message'))
                <div class="alert alert-success">
                    {{ session('message') }}
                </div>
            @endif 
            <h2 class="pb20">{{ __('All Notifications') }}</h2>
            <table class="table" id="notification-table">
                <thead>
                    <tr>
                        <th>Date & time</th>
                        <th>Notification</th>
                        <th style="text-align:center;">Action</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach ($notifications as $notification)
                        <tr>
                            <td>
                                {{ $notification->created_at }}
                            </td>
                            <td>
                                @if ($notification->type === 'App\Notifications\ClientApplicationReceived')
                                We received the Client application from you on.
                                @endif
                                @if ($notification->type === 'App\Notifications\BrokerApplicationReceived')
                                    We received the Broker application from you on.
                                @endif
                            </td>
                            <td style="text-align:center;">
                                <form action="/notifications/delete/{{ $notification->id }}" method="POST">
                                    @csrf
                                    <input type="hidden" name="id" value="{{ $notification->id }}">
                                    <input type="image" src="/assets/images/trash_can_icon_red.png" style="height:20px;">
                                </form>
                            </td>
                        </tr>
                    @endforeach
                </tbody>
            </table>       
        </div>
    </div>
</div>
Nov
13
2 months ago
Activity icon

Replied to Where Does This Point To? [email protected]

In version 8.x, showRegistrationForm() lives here: vendor\laravel\ui\auth-backend\RegistersUsers.php

public function showRegistrationForm()
{
    return view('auth.register');
}