Farouz

Farouz

Member Since 1 Year Ago

Experience Points 2,150
Experience
Level
Lessons Completed 16
Lessons
Completed
Best Reply Awards 0
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

01 Nov
1 week ago

Farouz started a new conversation Check Date Exists

Now i have records in my db "group_id","room_id", "date" ,"start_from"and "start_to", how to check the incoming orders doesn't exist in the same time with it's all possibility in laravel 5.5 this is the my first check

(!TimeTable::where(['room_id' => $request['room_id'], 'date' => $request['date'][$i], 'time_from' => $request['time_from'][$i], 'time_to' => $request['time_to'][$i]])->first()) what is the other checks

04 Jun
5 months ago

Farouz started a new conversation Passing Properties To Map Code

i have a branches and the single branch has lat and lag and the variable called $branchs i passed it from controller to the blade now i want to insert these records into this code to display the locations // Creating a new map var map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(30.9469529,31.182489,13), disableDefaultUI: true, navigationControl: false, mapTypeControl: false, scaleControl: true, draggable: true, streetViewControl: false, disableDoubleClickZoom: true, scrollwheel: false, zoom: 5, mapTypeId: google.maps.MapTypeId.ROADMAP });

var icon = "http://madlab.ca/assets/img/map-icon.png";

    // Creating the JSON data
    var json = {"locations": [

            {
      "lat": 49.2673302,
      "lng": -123.079302
    },
    // {
    //   "lat": 38.7325329,
    //   "lng": -121.2980867
    // },
    // {
    //   "lat": 42.3841269,
    //   "lng": -71.1134142
    // },
    // {
    //   "lat": 28.1276762,
    //   "lng": -80.633254
    // },
    // {
    //   "lat": 50.1029416,
    //   "lng": 14.4355941
    // }
        ]};//JSONend
26 Apr
6 months ago

Farouz left a reply on Matching Data

@tykus thank you very much it works and i am thankful

Farouz left a reply on Matching Data

@tykus i made this query in the blade to retrieve all data contains payment word and my blade contains Users and Contacts also i made this query for all of them

Farouz left a reply on Matching Data

$role_permissions retrieve the items from pivot table with roles and permissions

Farouz left a reply on Matching Data

doesn't work this solution @tykus

Farouz left a reply on Matching Data

and the solution ?

Farouz left a reply on Matching Data

i cant handle the markdown code so that its my code $role_permissions=PermissionsRole::where('role_id',$role->id)->get(); and this is the blade @foreach(\App\Permission::where('name','LIKE','%Payment%')->get() as $permission)

                                <li>
                                    <label class="checkbox-inline">
                                        <input type="checkbox" id="inlineCheckbox1" name="permission[]"

                                                            value="{{$permission->id}}"> {{$permission->display_name}}</label>
                                </li>
                            @endforeach

Farouz left a reply on Matching Data

i cat handle the Markdown code but it's my code

$role_permissions=PermissionsRole::where('role_id',$role->id)->get();

and this is my blade

@foreach(\App\Permission::where('name','LIKE','%User%')->get() as $permission)

  • {{$permission->display_name}}
  • @endforeach

    Farouz started a new conversation Matching Data

    i retrieved this variable A from database and it has a correct data then i passed it to the blade how can i manage in checkbox if the variable B id exists in the collection of variable A then make the checkbox is checked

    28 Feb
    8 months ago

    Farouz left a reply on Passing Variables

    this is my first function public function buyCourse($id) { $course = Course::findOrFail($id); $this->getDone($course); } and this the second public function getDone($course,Request $request) { // } like that ?

    Farouz started a new conversation Passing Variables

    how can i pass a variable from function to other in the same controller ?

    Farouz started a new conversation PayPal \ Exception \ PayPalConnectionException (28) Connection Timed Out After 10000 Milliseconds

    I used NetShell/Paypal -rest-api-sdk-php package and it was an error caller size of array() so i updated the package and i get this error PayPal \ Exception \ PayPalConnectionException (28) Connection timed out after 10000 milliseconds

    23 Feb
    8 months ago

    Farouz left a reply on Email To Group Of Users

    i made every thing in right way but i get this error Object of class stdClass could not be converted to string

    Farouz started a new conversation Email To Group Of Users

    Now iam sending email for agroup of users i have thire ids already so how can i get their email and run the function of mail this is my controller

    public function postSendMessages($id,Request $request){ $course=Course::find($id); $message=$request->message; $users=DB::table('courses_users')->where('course_id',$course->id)->select('user_id')->get('id'); foreach ($users as $user){ $user_email=User::where('id',$user)->first()->email; Mail::to('hossamfarouz15@gmail')->send(new MailToAll($user_email , $message)); } return back()->with('success','Messages Sent'); }

    what is the best way to do it ?

    17 Feb
    8 months ago

    Farouz started a new conversation Validation

    my question related to Validation : now i have $user->password this is the old password how i make a validation for input name='oldPassword' that the user must enter the the old password when reset his password

    14 Feb
    9 months ago

    Farouz left a reply on Page Not Found

    ok i was add $ in the route >route::get('/cat/{$id}' and this is the wrong

    Farouz started a new conversation Page Not Found

    trying to get this page and it responds with "Sorry, the page you are looking for could not be found." this is my href "@foreach($categories as $item)

  • <a href='{{route('GET_CATEGORY',$item->id)}}'>{{$item->title_ar}}
  • @endforeach " this is my route " Route::get('/category/{$id}','[email protected]')->name('GET_CATEGORY'); " and this is my controller " public function getCategory($id){ $category=CourseCategory::findOrFail($id); return view('User.Course.Category',compact('category','categories','courses')); } "

    05 Feb
    9 months ago

    Farouz started a new conversation Sharing Photos From Blade To Social Media

    how to active the sharing process from the view and to share to facebook or any social media including the image itself .

    30 Nov
    11 months ago

    Farouz left a reply on Save The Change Of The Checkbox-state On DB

    This is for my function in controller :::

    public function update(Request $request,$id){ $question=Question::find($id); if (Input::get('solved')== true){ $question->solved=1;

            $question->save();
    
        }
        else{
            $question->solved=0;
    
            $question->save();
        }
        $question->question=$request->question;
        $question->save();
    
    
        return redirect('/your-questions');
    }
    

    and this is for my form for edit :::::

    Solved and this is for my route :::: Route::post('/question/{id}/update','[email protected]');