walidabou

walidabou

Member Since 1 Year Ago

Experience Points
3,200
Total
Experience

1,800 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
5
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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 1
3,200 XP
Oct
11
3 days ago
Activity icon

Replied to JWT Multh Auth , With Different Models ( User Model , Customer Model )

Yes of coures because you didn't tell us what was the error and the error is straightforward.

Oct
10
4 days ago
Oct
05
1 week ago
Activity icon

Replied to Help Me Cant Extends The User

Remove the User class from function parameteres.

public function show(User $id) {
    return $id;
}

Correct is:

public function show($id) {
    return $id;
}
Oct
01
1 week ago
Activity icon

Replied to Foreach Returns More Than Actual Database Records

You can dd($account_types) and see if the desired attributes are present or not.

You can find them in attributes of each item.

Or check that you spell the arribute name correctly in the <option> tag.

Activity icon

Replied to Foreach Returns More Than Actual Database Records

Is a single account has more than one account_status & account_type ?

Is it one to many relationship ?

Activity icon

Replied to Foreach Returns More Than Actual Database Records

findOrFail method returns a single instance not a collection. You can't do a foreach. So your $accounts variable actually contains only ONE account.

Sep
17
3 weeks ago
Activity icon

Replied to Want Get Data Or Method In Relationship .

public function somedata() not function somedata()

Activity icon

Replied to "These Credentials Do Not Match Our Records" In Laravel 5.8 Auth Login Page

Try add this:

use Illuminate\Foundation\Auth\AuthenticatesUsers;

class FormatoreLoginController extends Controller
{
    use AuthenticatesUsers;



    //Other code



    protected function guard()
        {
            return Auth::guard('formatore');
        }
}

I don't know why you deleted AuthenticatesUsers trait ? with default AuthenticatesUsers added in your controller you don't need to add custom public function login().

Sep
16
4 weeks ago
Activity icon

Replied to Vue V-for

Did you try my solution ?

Activity icon

Replied to Why My Post Is Not Deleting

This should be a POST request not Get request.Therefore it should be inside a form.

<form class="d-inline-block" action="{{ route('channel.destroy',$channel->id) }}" method="POST">
        @csrf
        <button type="submit" class="btn btn-danger">Delete</button>
</form>
Activity icon

Replied to Vue V-for

You can do something like this.

const carsNames = [];       //To store all cars names.
const uniqueCars = [];      // To store unique objects without duplicates.
const cars = response.data;     //The data that you get from the server.

cars.forEach(car => {

    if(!carsNames.includes(car.carMake)) {

        uniqueCars.push(car);
        carsNames.push(car.carMake);
    }
});

this.data = uniqueCars;

That's what came to my mind now. There might be a better way to do it. If I find another way I will mention it.

Sep
09
1 month ago
Activity icon

Replied to Extend Auth Logic Without Modifying Laravel Files

Simply create the method in LoginController.php

use Illuminate\Http\Request;

protected function credentials(Request $request)
{
      return $request->only($this->username(), 'password');
}

So it overrides the method inside AuthenticatesUsers trait.

Activity icon

Replied to Vue On Submit

What you want to send to the other site ? Are the data the come from your server ?

Activity icon

Replied to Difference Between Laravel Echo And Laravel Echo Server?

If you are going to use pusher you don't need laravel echo server. You just need laravel echo on the front end.

laravel echo server is a community driven Socket.IO server as Laravel does not include a Socket.IO server implementation.

Sep
08
1 month ago
Activity icon

Replied to Refresh Page Without Reloading

You need Ajax

Sep
07
1 month ago
Activity icon

Replied to Real Time Communication Using Laravel And Pusher

remove the $ sign from the event constructor.

$this->$text = $text;

to

$this->text = $text;
Activity icon

Replied to JWT AUTH , How Can I Recuparate The User Detales In The Controller

You should always send the token with every request. otherways laravel won't know who is making the request.

Activity icon

Replied to 422 (Unprocessable Entity) // CreateError.js:16 Uncaught (in Promise) Error: Request Failed With Status Code 422

It seems like you have a validation error on server side.

.then(function(error)).

replace it with:

.catch(err => console.log(err.response))

to see what is the error message that you'r getting from the server.

Aug
27
1 month ago
Activity icon

Replied to Dealing With A [( )] Response

try parse the results first with JSON.parse(results).

Activity icon

Replied to Click.prevent

as you have @submit.prevent="checkPaymentForm" You don't need e.preventDefault() inside the function.

Aug
26
1 month ago
Activity icon

Replied to Axios Dosent Redirect.

You can't do server redirects with ajax requests. you must use location.href = url on client side to redirect.

Aug
25
1 month ago
Activity icon

Replied to Refactoring An Sql Sentence To Eloquent Style

better way is to make relationships between your models and use eager loading as MINA mentioned instead of using join method frequently.

Activity icon

Replied to Vue Form Validation

You can use VeeValidate to validate theinputs inside vue component. https://baianat.github.io/vee-validate/

Activity icon

Replied to Quering Restaurants According To Particular Food

Have you defined the relationship in the Restaurant model ?

public function foods() {
    return $this->hasMany('App\Food');
}

And I correct a mistake that I made in my respond => foods not food

Aug
18
1 month ago
Activity icon

Replied to Quering Restaurants According To Particular Food

Restaurant::whereHas('foods', function($q) use($request){
$q->where('food_item', 'like', '%' . $request->attribute . '%');
}
)->get();
Activity icon

Replied to Call To Undefined Function Save()

there is a syntax error: $menu->save() not $menu>save()

Aug
17
1 month ago
Activity icon

Replied to Rendering Restaurants On Google Maps

Try using Leaflet instead of Google map as google map is no longer free as I suspect. https://leafletjs.com/

They have great documentation and there is a section explains how to put the coordinations (LONG, LAN) and render your restaurant on the map.

May
25
4 months ago
Activity icon

Replied to How To Update Staus = 0

Make sure that the "status" column was added to "fillable" property in Order model.

May
23
4 months ago
Activity icon

Replied to Form's Submit To Add Comment Not Working T

try this

action="{{ route('comment.store') }}"
May
15
4 months ago
Activity icon

Replied to Blade: Check If Old Values Are Empty Or Not

value="{{old('input') ? old('input') : ''}}"
May
11
5 months ago
Activity icon

Replied to Line Break Inside Foeach

Do you want line break or horizontal line ?

Activity icon

Replied to Output To Same View From Different Controllers

Why you want to send data to single view from two controllers ? Why not you send it from one method?

May
03
5 months ago
Activity icon

Replied to Search Not Appending To URL Using GET

You can shorten the huge number of "option" tags by performing some for loops

Apr
27
5 months ago
Activity icon

Replied to Multiple Models With Chained One-many Relationships

use nested relationships

User::with('pages.images.comments')->get();

Nov
24
10 months ago
Activity icon

Replied to Pass Response Data To The Parameters Of Another AJAX Request With AXIOS

Try to put the second axios.get inside the first one, immediately after this.schedule = response.data;

so code it will look like this:

getClassroom() {
        
        axios.get('/get-schedule', params {
            day: 'monday',
        }).then(response => {

            //this response data has classroom_id and I want to send it to the second axios.get
            this.schedule = response.data;
    axios.get('/get-classrooms', params {
            // HERE - I need to receive the classroom_id from first axios.get, but this way the this.schedule.classroom_id does not set the parameter
            classroom_id: this.schedule.classroom_id

        }).then(response => {
            console.log(response.data);
        })
        })

If it does not work make sure your response.data match the structure of "schedule object" that you defined.
        

    }
Activity icon

Replied to Change In Request Validation From 5.6 To 5.7

Try add "nullable" rule so it will look like this

'print' => 'nullable|mimes:pdf'
Nov
23
10 months ago
Aug
14
1 year ago
Activity icon

Started a new conversation Inquire About "BroadcastMessage" Instance Inside "toBroadcast" Method In A Notification Class

Hello LaraGuys. I Wonder about the functionality of "BroadcastMessage" instance inside "toBroadcast" method in a notification class, and what it does actually. Because whether I remove it or keep it, the response stay the same.

In other word, what is the difference between these two functions:

public function toBroadcast()
    {
        return new BroadcastMessage([
            'data' => ['ad' => $this->ad]
        ]);
    }

public function toBroadcast()
    {
        return ['data' => ['ad' => $this->ad]];
    }

Mar
10
1 year ago
Activity icon

Replied to Vue Components Doesn't Update On Shared Hosting Server

Thank you all for your help guys.

Activity icon

Replied to Vue Components Doesn't Update On Shared Hosting Server

"alex_giacholari"

But what if the host provide SSH access, Can i complie the assets by running "npm run watch" on the fly. Or not ?

Activity icon

Replied to Vue Components Doesn't Update On Shared Hosting Server

"alex_giacholari"

You mean that i have to keep a copy of my app on my computer so whenever i need some changes i do it locally and then uploading neccesarey files to the server, right ?

Activity icon

Replied to Vue Components Doesn't Update On Shared Hosting Server

"Sanctuary", 'When you say you're editing a Vue component, are you doing it locally ?'

No i do it on the server.

'If you're doing it all on your server, it's not updating because you need to recompile it before it'll take any effect.'

So you mean that whenever i want to edit a component, i have to do it locally, run "npm run watch" and then uploading these two files (/public/css/app.css) and (/public/js/app.js) ? Is this normal?

Activity icon

Replied to Vue Components Doesn't Update On Shared Hosting Server

"alex_giacholari", Yes i did.

Activity icon

Replied to Vue Components Doesn't Update On Shared Hosting Server

"alex_giacholari" Yes i ran "npm run production" before delpoying. My problem is when i edit a vue component, it is not updated on the DOM even if i refresh the browser.

and also i'm still getting this message in console: "You are running Vue in development mode. Make sure to turn on production mode when deploying for production."

even if i ran "npm run production" before deploying.

Activity icon

Replied to Vue Components Doesn't Update On Shared Hosting Server

Thank you for your quick reply. Yes i know that Vuejs is a framwork in itself but, i prefere to use that which is buil-in with laravel, at least for now.

Also i know that shared hosting is not ideal when working with this kind of applications that contain some of vue or angular...etc. but , Now i'm just practicing and i want to test my apps how they work on real server and what problems can i encounter. So i have a question on this : If i have an application (laravel & vuejs for example) and it works correctly on my local server, does that mean it will work perfectly on real server without any problems ? And, are javascript framworks in general (vue angular react...etc) require Node js to be installed on the server (real server) ?

Thanks.

Mar
09
1 year ago
Activity icon

Started a new conversation Vue Components Doesn't Update On Shared Hosting Server

Hello everyboy.

I'm facing a problem that is when i deployed my laravel 5.5/vuejs application i can't update the vue components. in the development mode i didn't encounter this problem because i run "npm run watch". but on real server (000webhost.com just for testing) how can i perform this command. what i'm doing right now is editing the components in my local server, run "npm run watch" and then uploading these two files (/public/css/app.css) and (/public/js/app.js) to the server. and it works but after cleaning browser cache which is another problem unfortunately.

"I'm using Vuejs which is built-in with laravel"

Is shared hosting appropriate to host apps that contain vue components or nodejs apps in general ? Or is this kind of applications require a hosting with powerful capabilities like forge and Digitalocean ?

If there is a ways or tips to fix these issues please help me.