InaniELHoussain

InaniELHoussain

Member Since 4 Years Ago

Experience Points
128,910
Total
Experience

1,090 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
934
Lessons
Completed
Best Reply Awards
95
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 26
128,910 XP
Sep
27
2 years ago
Activity icon

Replied to Testing An Input With Array Name Syntax

Solved this way

$input = [
            'question' => 'Best Series Ever?',
            'options[0]' => 'Narcos',
            'options[1]' => 'Breaking Bad'
        ];

$this->beAdmin()
            ->visit(route('poll.create'))
            ->submitForm('create', $input);
Activity icon

Started a new conversation Testing An Input With Array Name Syntax

Hello Coders! As The title says I don't know how to make an integration test in the case that I have inputs with an array syntax like :

<input type="text" name="options[]" class="form-control"/>
    <input type="text" name="options[]" class="form-control"/>

In test Class :

$this->visit(route('poll.create'))
            ->type('Best Serie Ever?', ? )// for

Thanks in Advance.

Sep
26
2 years ago
Activity icon

Replied to Auth With MD5

Its easy just type your password Hash::make("newPassword") in a route and get the hashed password and edit it as I said earlier. Dont forget to import the Hash class.

Activity icon

Replied to Auth With MD5

I dont think MD5 is been used by Laravel, I didnt really understand your question but I guess is that you have the hashed password and you dont know the password it self? is that right? If yes I'd hash a new password and edit it directly from the database.

Activity icon

Replied to Consulting Needed For Finishing Stages Of Laravel Project

Here its for free, whenever you have an issue feel free to post it, we will be doing our best to help u. Good luck.

Activity icon

Replied to Need Help With Eloquent Data Model/relationships Or Query Statement

I see, I'll think for a while, honestly I'd think a way with Native SQL

Activity icon

Replied to Need Help With Eloquent Data Model/relationships Or Query Statement

What do u want to get? its not clear yet for me.

Dec
31
2 years ago
Activity icon

Replied to Select Values Missing When Using Vue.js Inside A Blade Template

Weird :(, it works just as excpected for me

Activity icon

Replied to Select Values Missing When Using Vue.js Inside A Blade Template

@christophrumpel Actually the same code works, the problem is the "ΓΌ" car.

Dec
29
2 years ago
Activity icon

Replied to Fetch Parent Column When Using Relationships

As @vmitchell85 said you should append the name of the chef to the Model.

in your Food model

protected $appends = ['chef'];

public function getChefAttribute(){
    return $this->chef->name;
}
Dec
07
2 years ago
Activity icon

Replied to How To Get The Request From A Serialized Data In Ajax/query

public function create(Request $request){

    $data = $request->v_status;
    dd($data); // it should show the input values

return Response($b);
}
Activity icon

Replied to How To Get The Request From A Serialized Data In Ajax/query

using ur js code it should be like that

public function create(Request $request){

    $data = $request->v_status;
     dd($data->v_id);

 return Response($b);
}
Activity icon

Replied to Class 'PDF' Not Found In DomPDF

@Amalmax both the facade and service provider? could you share the code?

Activity icon

Replied to How To Get The Request From A Serialized Data In Ajax/query

with your code

data: {v_status:data,_token:token},

then the v_status variable is no more holding the hidden value, but the serialzed value of the form.

Activity icon

Replied to Class 'PDF' Not Found In DomPDF

are you sure you are registring the alias in the config/app.php

'PDF' => Barryvdh\DomPDF\Facade::class,
Activity icon

Replied to How To Get The Request From A Serialized Data In Ajax/query

then please share with us the form.

Activity icon

Replied to Call To A Member Function GetClientOriginalExtension() On Array

use this line

$profile_img = Input::file($data['profile_img']);
Activity icon

Replied to How To Get The Request From A Serialized Data In Ajax/query

try this

 data = $("form").serialize();
$.ajax({
   type: 'POST',
   url: url,
   data: {v_status:data,_token:token},
   success: function(data){
     alert(data.data);
    }
   
 });
Nov
05
2 years ago
Activity icon

Replied to Need Help With Query

your query

$old_posts= Post::whereDate('created_at', '<', Carbon::today())
        ->orderBy('created_at', 'asc')
                    ->groupBy(function ($date) {
            return $date->created_at->format('Y');
        })->get();
Activity icon

Replied to Need Help With Query

checkout this

@php $post; @endphp

@foreach($old_posts as $oldPost)
    {{ $post!=$oldPost->created_at? $oldPost->created_at: ''  }}
   - {{ $oldPost->link}} <br />
@php $post= $oldPost->created_at; @endphp
@endforeach 
Activity icon

Replied to Need Help With Query

It seems correct!

Activity icon

Replied to Increment Colomn Content By One

@Jayanthkumar check first if the result isn't empty. thats how it works the increment method

$item = DB::table('Enquiry')
        ->where('customer_id', Input::get('customer_id'));
Activity icon

Replied to Increment Colomn Content By One

$item = DB::table('Enquiry')
        ->where('customer_id', Input::get('customer_id'))->increment('finished');
Activity icon

Replied to How To Print Variable Data?

@Amalmax hahaha I've showed you how in the other topic, the problem, is that you don't know your models! we can't help you if you don't even know what are your Models.

Activity icon

Replied to Saving Form Data To Multiple Tables In One Function

@n31l one thing is to set your name and description filed to fillable in the Data Model, the same for DataFile(data_id, dataname). after that you can do something like

public function storeData(Requests $request){
$data= Data::create($request->all());
   $datafile= Datafile::create($request->all());
}
Nov
04
2 years ago
Activity icon

Replied to Is There Way To Make Warp As Snippet In Phpstorm ?

@TheBlueDragon after all you used live templates as I told you before

Nov
01
2 years ago
Activity icon

Replied to How To Debug A JS Error

what about Firebug.

Activity icon

Replied to Can Create Model Name As Model And Table Name As Models

@subakarank you said 'table name' not model's name, otherwise @ohffs is just the best!! just pay attention to rename Eloquent Model whenever u use both of them

Activity icon

Replied to Form Data Not Saved But No PDOException Error Message

but you won't be able to use it in the session

Activity icon

Replied to Can Create Model Name As Model And Table Name As Models

sure!! there is no restriction on the name

Activity icon

Replied to Can Create Model Name As Model And Table Name As Models

can you be more explicite, its hard to understand what you want.

Activity icon

Replied to Form Data Not Saved But No PDOException Error Message

what about?

return redirect()->back()->withInput()->withErrors(['error',$e->getMessage()]);
Activity icon

Replied to Form Data Not Saved But No PDOException Error Message

your view? the part where you show the errors

Activity icon

Replied to Remember The Form Input Even If Validation Fails

in the input use the old helper method

<input type="text" class="form-control" name="username" value="{{ old('username') }}">
Oct
31
2 years ago
Activity icon

Replied to Layout Variables

@qteck thats what I already told you in the last replay(https://laracasts.com/discuss/channels/laravel/layout-variables/replies/290727). at least tag it as best answer.

Activity icon

Replied to Scope Query Using Model

where is the controller?

Activity icon

Replied to Layout Variables

have you declared it in the controller class?

protected $user;
Activity icon

Replied to Scope Query Using Model

are you sure your route is set? and the method as well as I mentioned to you before.

Activity icon

Replied to Layout Variables

@qteck as an alternative use the following code inside the constructor

        $this->middleware(function ($request, $next) {
            $this->user= Auth::user(); // dont forget to add the property

            return $next($request);
     });
    return view()->share('user', $this->user);
Activity icon

Replied to Layout Variables

@qteck if you are using L5.3 then the user is null in the constructor of controllers

Activity icon

Replied to Manipulating The DOM With Vuejs

I don't think you can do too much with vueJS, you can use jQuery, as I did

Activity icon

Replied to Scope Query Using Model

@Amalmax I told you, you must edit the form as well to send the id of the project

Activity icon

Replied to How To Focus On An Input After Disabling?

here is it.

   comment (id) {
                  this.disable = true;
                  this.$http.post('/ajax/' + this.postId + '/comment', { body: this.body }).then((response) => {
                     eventHub.$emit('comment-added', response.body)
                        this.body = null
                     this.disable = false
            this.focus()
                    })
           }
Activity icon

Replied to How To Focus On An Input After Disabling?

using jquery, provid an id to the input

$("#myTextBox").focus();
Activity icon

Replied to Scope Query Using Model

@Amalmax there is no need to add the get Methods in the controller, just use them directly.

plus, your route must be something like that

Route::get('projects/{project}/collaborators/{id}/permissionedit','[email protected]');

and the method

public function edit($project, $id)
{
// $permissions = Permission::project()->get();
$projectId =Project::findOrFail($project);
$permissions = Permission::permissioneditt($id,$projectId)->get();
    return view('collaborators.permissionedit')->withPermissions($permissions);
//  $permissions = Collaborator::permission($collaboratorId, $projectId)->get();

 }

and of course you need to edit your Form action