Ap3twe

Ap3twe

Member Since 1 Year Ago

Canada

Experience Points
18,240
Total
Experience

1,760 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
120
Lessons
Completed
Best Reply Awards
2
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.

Level 4
18,240 XP
Aug
01
1 week ago
Jul
30
1 week ago
Activity icon

Awarded Best Reply on Alpine Extract Value From Select[option]

I fixed it. It was x-model not x.model

   <select x-model.number="chromeNow">
       <option value="7499.00">1</option>
       <option value="12700.00">2</option>
  </select>
  <select x-model.number="chromeNatural" >
     <option value="6900.00" >1</option>
     <option value="1200.00">2</option>
  </select>

Activity icon

Replied to Alpine Extract Value From Select[option]

I fixed it. It was x-model not x.model

   <select x-model.number="chromeNow">
       <option value="7499.00">1</option>
       <option value="12700.00">2</option>
  </select>
  <select x-model.number="chromeNatural" >
     <option value="6900.00" >1</option>
     <option value="1200.00">2</option>
  </select>

Activity icon

Replied to Alpine Extract Value From Select[option]

I tried it no action. does the x-model only listen to input text?

Based on the docs, X-model Adds "two-way data binding" to an element. Keeps input element in sync with component data."

Activity icon

Replied to Check The Db To See When Queue Jobs Are Done?

Explain clearly what you want and show some code. Do you want to send a notification that downloads are ready while he is still log in or while he is logout? In a scenario, you can send a mail and embed the URL of the destination files.

Activity icon

Replied to Creating Video Tutorials Website Using "videojs.com" Nad "Laravel"

<input type="file" accept="video/mp4,video/x-m4v,video/*" name="lab_vimeo" id="vimeo" value="{{old('lab_vimeo')}}">

You wanna access the video, use

 <video id='my-video' class='video-js vjs-default-skin video-responsive' controls preload='auto' width='400' height='308' poster='MY_VIDEO_POSTER.jpg' data-setup='{}'>

  <source src="{{asset('storage/uploads/video/' .$project->lab_vimeo) }}" type='video/mp4'>
    <p class='vjs-no-js'>
      To view this video please enable JavaScript, and consider upgrading to a web browser that
     <a href='https://videojs.com/html5-video-support/' target='_blank'>supports HTML5 video</a>
     </p>
  </video>
Activity icon

Replied to Help With DB Connection Issue

Check your MySQL password. Are you sure you are using the correct password?

Activity icon

Started a new Conversation Alpine Extract Value From Select[option]

Trying to use the x-model.number to get values from select option to calculate the values. Using input text works. How do I translate it on select option?

 <div x-data="{first: 0, second: 0}">
        <input type="text" x-model.number="first"> + <input type="text" x-model.number="second"> =
        <output x-text="first + second"></output>
   </div>

// Select option example 1 not working

<div x-data="{chromeNow: 0, chromeNatural: 0 }">

       <select>
           <option value="7499.00" x.model.number="chromeNow">1</option>
           <option value="6900.00" x.model.number="chromeNow">2</option>
      </select>
      <select >
         <option value="6900.00" x.model.number="chromeNatural">1</option>
         <option value="1200.00"  x.model.number="chromeNatural">2</option>
      </select>

   <h3 x-text="chromeNow + chromeNatural"> </h3>

</div>

// Select option example 2 not working

<div x-data="{chromeNow: 0, chromeNatural: 0 }">

       <select x.model.number="chromeNow">
           <option value="7499.00">1</option>
           <option value="12700.00">2</option>
      </select>
      <select x.model.number="chromeNatural" >
         <option value="6900.00" >1</option>
         <option value="1200.00">2</option>
      </select>

   <h3 x-text="chromeNow + chromeNatural"> </h3>

</div>
Activity icon

Awarded Best Reply on How To Go Incorporate Different Projects Into One?

I need to close this. The project is too large

Activity icon

Replied to How To Go Incorporate Different Projects Into One?

I need to close this. The project is too large

Jul
15
3 weeks ago
Activity icon

Started a new Conversation Controller Action Route

Guys, I have multiple controllers, projectsController, and Bookscontroller. The methods have the same name create, show, edit, delete.

Hitting <form method="POST" action="/store" id="form" enctype="multipart/form-data"> Books controller, I get 302 HTTP error. I tried below code but still same error.

The problem is I am have two Route::post('/store', '[email protected]'); Route::post('/store', '[email protected]');. How do I specifically target the book controller?

<form method="POST" action="{{action('[email protected]')}}" id="form" enctype="multipart/form-data">
  {{ csrf_field() }}
        <div class="grid grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 mb-3">
           <div class="">
             <label for="patientfirstname">Patient First Naame</label><br>
            </div>
                     <input type="submit">
         </div>
</form>

Routes

Route::post('/store', '[email protected]');
Route::post('/store', '[email protected]');
Activity icon

Awarded Best Reply on INNER JOIN OR LEFT JOIN

What I was looking for were records that do not match from Table A compared to Table B. I had to use a Full Outer JOIN. In MySQL, I had to use a UNION.

SELECT *
FROM   scotlist s 
LEFT JOIN allcustmomers c 
ON  s.Fullname = c.Fullname AND s.City = c.City AND s.zipcode = c.zipcode
UNION
SELECT * 
FROM scotlist s
RIGHT JOIN allcustmomers c
ON s.Fullname = c.Fullname AND s.City = c.City AND s.zipcode = c.zipcode
WHERE s.Fullname is NULL AND s.City is NULL AND s.Zipcode is NULL;

Activity icon

Replied to INNER JOIN OR LEFT JOIN

What I was looking for were records that do not match from Table A compared to Table B. I had to use a Full Outer JOIN. In MySQL, I had to use a UNION.

SELECT *
FROM   scotlist s 
LEFT JOIN allcustmomers c 
ON  s.Fullname = c.Fullname AND s.City = c.City AND s.zipcode = c.zipcode
UNION
SELECT * 
FROM scotlist s
RIGHT JOIN allcustmomers c
ON s.Fullname = c.Fullname AND s.City = c.City AND s.zipcode = c.zipcode
WHERE s.Fullname is NULL AND s.City is NULL AND s.Zipcode is NULL;

Jul
10
4 weeks ago
Activity icon

Started a new Conversation INNER JOIN OR LEFT JOIN

I am querying 2 tables to get nonmatching values based on city, zip code, and fullname. Table A has 30,000 records, Table B has 2,000 records.

I tried inner join by assigning ON condition != It produces duplicates of about 3 Values to fill up the 32000 records.

'23997', 'Dr ***', '107 ***', 'Bogota', 'ks', '** bo', '*****2', '1807'
'23997', 'Dr ***', '107 ***', 'Bogota', 'ks', '** bo', '*****2', '1807'
SELECT s.id, s.Fullname, s.Address, s.city, s.Province, s.Zipcode, s.telephone, c.id
FROM scotlist s
JOIN allcustmomers c 
ON c.city != s.City AND c.Zipcode != s.Zipcode AND c.Fullname != s.Fullname
order by s.id DESC; 

If I do LEFT JOIN I am sure I will get all records of Table A, but that is not what I need. What am looking for is the unmatching records from table A if they do not match Table B

Jun
24
1 month ago
Activity icon

Replied to How To Go Incorporate Different Projects Into One?

It is a big conversation indeed. I am confused as you. All the websites as a standalone are static websites. Each will have an upload portal to send files.

My plan is to build one portal for all the sites where they can upload files. Each process is different though so lets say each product will have a form - multipage form to send a case.

Requirements include:

Form, Order Lists view Track Case View Profile

API UPS, POST

These are some of the requirements. Consolidating them in one portal will ease our clients from visiting separate sites to upload and track cases in each websites

Activity icon

Replied to Writing Own Auth System In Laravel 5.0

Please can you clarify what you want?

Activity icon

Replied to How To Send A Mailgun-Template

You can make your mail template in laravel. It Is easy.

Activity icon

Started a new Conversation How To Go Incorporate Different Projects Into One?

I am task to build a web portal for my company. We had always built each project (websites) separately from each other. For example, we have 2shape.com, bigo.com, etc. We plan to have about 10 projects incorporated as one portal. One authentication gateway for all users.

The question is what is the best process to go about it? Do I use one database with separate tables for each product(project)? Will it be scalable?

Apr
18
3 months ago
Activity icon

Replied to What Have You Been Doing Since Covid19 Lockup?

Who provides laravel certification?

Activity icon

Replied to What Have You Been Doing Since Covid19 Lockup?

That is impressive. I get to keep up. My kids are not giving me the space 😆

Mar
23
4 months ago
Activity icon

Replied to PHP Code Base To IOS

Mobile app

Activity icon

Replied to PHP Code Base To IOS

I have picked up Flutter Learning it slowly. Developing in web and mobile separately is expensive.

Activity icon

Replied to PHP Code Base To IOS

I know. I thought there was a compiler for it.

Activity icon

Started a new Conversation What Have You Been Doing Since Covid19 Lockup?

I have been at home tired of doing nothing. My mind is not working anymore. How about you? What is helping you to continue, any laravel projects you working on? Share your experience!

Activity icon

Replied to General Error: 1364 Field 'name' Doesn't Have A Default Value

Jeez for an unknown reason name was missing in the $fillable. Thank you

Activity icon

Replied to General Error: 1364 Field 'name' Doesn't Have A Default Value

I get all request

array:5 [▼
  "_token" => "gnnThQGv6IshKGb8TYLIv68u8r38Cy674EUdi7Al"
  "name" => "John Doe"
  "email" => "[email protected]"
  "password" => "JohnDoe"
  "password_confirmation" => "JohnDoe"
]
``
Activity icon

Replied to Best Way To Save An Array In A Db

Try this , You will need to implode or json_decode it to retrieve it from the database

//$prod= $request->input('prod');

$data = array();
foreach ($request[$prod] as $prod){
$data[] =$prod ;
        }
 $sup = new supplies();
 $sup->prod = ($data);
 $supllies->save()

Example of decode

$prod = $supplies->prod;
$explodeItems = json_decode($prod);

After just use foreach on it.

Activity icon

Started a new Conversation General Error: 1364 Field 'name' Doesn't Have A Default Value

I am using the default auth shipped with laravel. When I try to register a user, I get the error MySQL "General error: 1364 Field 'name' doesn't have a default value"

I run the query in workbench and it works. INSERT INTO users (id,name,password,email) values (1,'meteace', '****', 'f***@yahoo.com'); I have used this in a lot of projects just this is giving me problems. I hope someone catches the problem for me.

Users Migration table

  public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->BigIncrements('id');
            $table->string('name');
            $table->string('password');
            $table->string('email', 128)->unique();
            $table->timestamp('email_verified_at')->nullable();
            $table->rememberToken();
            $table->timestamps();
        });
    }

Registers Controller

  protected function validator(array $data)
    {
        return Validator::make($data, [
            'name' => ['required', 'string', 'max:255'],
            'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
            'password' => ['required', 'string', 'min:8', 'confirmed'],
        ]);
    }
    protected function create(array $data)
    {
        return User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => Hash::make($data['password']),
        ]);

    }

Blade View

<div class="form-group row">
<label for="name" class="col-md-4 col-form-label text-md-right">{{ __('name') }}</label>
    <div class="col-md-6">
       <input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" 
         value="{{ old('name') }}" required autocomplete="name" autofocus>

                      @error('name')
                            <span class="invalid-feedback" role="alert">
                                  <strong>{{ $message }}</strong>
                            </span>
                      @enderror
         </div>
    </div>
Mar
16
4 months ago
Activity icon

Replied to PHP Code Base To IOS

I created an app on react and was loving it until it got to Flux damn, my head was exploding. By the time I was done, I had grown 2 inches grey hair.

Activity icon

Replied to PHP Code Base To IOS

Do you mean .net core official website?

Activity icon

Started a new Conversation PHP Code Base To IOS

  1. Any suggestion on how to convert a PHP project to IOS app or is it better to learn react-native/flutter to create from scratch?

  2. Is there Vue equivalent of React Native?

  3. Is learning Swift comparable to PHP? Does it borrow some syntax Interoperability?

Mar
10
4 months ago
Activity icon

Replied to Mastering Full Stack

Thank you. Practicing makes man perfect

Activity icon

Replied to Mastering Full Stack

That is what am doing. Sometimes the problem I face is which should I focus first. Like most of my projects are laravel, Jquery, Vanilla Javascript, and bootsrap. I am trying to jump on declarative framwork such as Vue and alpinejs. I tried React and when it came to Redux, I was fucking lost.

Activity icon

Replied to Mastering Full Stack

I am talking about an intermediate developer. CSS, Html, Javascript is an afterthought. That's why I said Please *Take it into consideration of someone who already knows Laravel/CSS/HTML.

Activity icon

Started a new Conversation Mastering Full Stack

Guys what do you think of the learning curve and the possibility of becoming a master in these frameworks and libraries? How will you go about learning these such as the order? *Take it in consideration of someone who already knows Laravel.

Laravel 
Vue
Livewire
Alpine.js
Tailwind.css
Feb
18
5 months ago
Activity icon

Replied to Queue Job Failing

Event Class

class NewProjectCreated
{
    use Dispatchable, SerializesModels;

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

}

Listener Class

class SendProjectCreatedToLabNotification
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  NewProjectCreated  $event
     * @return void
     */
    public function handle(NewProjectCreated $event)
    {

          $labtime = Carbon::now()->addMinutes(1);
        //   $labMail =  \Config::get('LAB_MAIL', 'default');
          $labMail =  \Config::get('credentials.labmail');

          Mail::to($labMail)->later($labtime , new ProjectCreatedLabNotificatication($event->project));

    }
}

Mail Class

class ProjectCreated extends Mailable
{
    use Queueable, SerializesModels;
      public $project;
    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($project)
    {
        $this->project = $project;
    }

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

Markdown

@component('mail::message')
@php
$sixDigitId =  str_pad($project->id, 6, '0', STR_PAD_LEFT);
@endphp

Case: Smile Design <br>
Case has been created successfully for patient {{$project->first_name. ' ' .$project->last_name}}.
<br> Case number is {{$sixDigitId}}.
@component('mail::button', ['url' => url('/smiledesign/cases')])
View Project
@endcomponent

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

@endcomponent