Azik

Azik

Member Since 11 Months Ago

Ferghana

Backend Developer at Youcode

Experience Points 4,850
Experience Level 1

150 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 32
Lessons
Completed
Best Reply Awards 2
Best Reply
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.

15 May
5 days ago

Azik left a reply on The Page Has Expired Due To Inactivity.Please Refresh And Try Again This Error Comes When Login To Admin Panel

Thank you all for the answers. The reason is that server sessions are not working properly.

08 May
1 week ago

Azik started a new conversation The Page Has Expired Due To Inactivity.Please Refresh And Try Again This Error Comes When Login To Admin Panel

When running on local server it did not have the same problem after it was deployed to the ISPManager this problem The page has expired due to inactivity. Please refresh and try again occurs when the user logs into the panel.

29 Sep
7 months ago

Azik left a reply on I Need Help, Data Wont Show With Selectable Dropdown With Jquery

 $(document).ready(function(){
        $("#room").change(function(){
            $("#price").val($(this).attr('data-price'));;
        });
    });

Azik left a reply on Inserting A Datetime With Carbon::now() But Add A Null Attribute Laravel

'date_activated ' => new \DateTime, if this also couldn't help

try this $table->timestamp('date_activated');

Azik left a reply on Laravel Take Not Working

show me school and its relation models..

Azik left a reply on Laravel Take Not Working

in controller display your data with dd($schools)

{  
 $schools = School::with('activities.cluster', 'activities.group')->where('user_id', Auth::user()->id )->first();
dd($schools);
}

Azik left a reply on Laravel Take Not Working

try first() ..

{ $schools = School::latest()->with('activities.cluster', 'activities.group')->where('user_id', Auth::user()->id )->first(); return view('Admin.submit-information.all', compact('schools')); }

Azik left a reply on How To Access The Image Location From The View

<img src="{{ asset('storage/'.$data->file_name.'/'.$data->image_name) }}">

28 Sep
7 months ago

Azik left a reply on TWO FIELDS IN ONE COLUMN.

before showing in your view check the order of date it should be looks like 2018-09-29

Azik left a reply on TWO FIELDS IN ONE COLUMN.

Corporate Personal

Azik left a reply on TWO FIELDS IN ONE COLUMN.

Well, it's easy to check on the condition..

@if($customer->type == 1) Corporate @else [email protected]

or

{{ $customer->type ? 'Corporate' : 'Personal' }}

Azik left a reply on TWO FIELDS IN ONE COLUMN.

yes, so it's better to use string or boolean type..

Azik left a reply on TWO FIELDS IN ONE COLUMN.

this way is also not bad.,

$table->enum('customer_type',['cor','per']);

Azik left a reply on The Given Data Was Invalid

try this..

// namespace

use Illuminate\Validation\Rule;

// usage gender'=> [ Rule::in(['female', 'male','none']), ],

Azik left a reply on TWO FIELDS IN ONE COLUMN.

or

$table->boolean('type')->default(1);

it is up to you..

Azik left a reply on TWO FIELDS IN ONE COLUMN.

i think create type column is simple way..

27 Sep
7 months ago

Azik left a reply on Merge Images

http://image.intervention.io/ package also has like this insert — Paste over another image function

Azik left a reply on How To Store Row Id In Laravvel

change from input names ..

        <form action="{{ route('requisitions.store')}}" method="post">
            {{ csrf_field() }}
            <div class="radio">
                <label for="school">School</label>
                <input type="radio" value="1" id="school" name="school">
                <br>
                <label for="equipment">Equipment</label>
                <input type="radio" value="2" id="equipment" name="equipment">
                <br>
                <label for="level">Level</label>
                <input type="radio" value="3" id="level" name="level">
                <br>
                <label for="place">Place</label>
                <input type="radio" value="4" id="level" name="level">
                <br>
                <label for="tax">Tax</label>
                <input type="radio" value="5" id="tax" name="tax">
                <br>
                <label for="reactivation">Reactivation</label>
                <input type="radio" value="6" id="reactivation" name="reactivation">
                <br>
                <button type="submit" class="btn-warning btn">Send</button>
            </div>
        </form>

Azik left a reply on Image Upload To Pivot Table

any ideas?

Azik left a reply on Image Upload To Pivot Table

any ideas?

25 Sep
7 months ago

Azik left a reply on Insert Additional Pivot Table Attributes

it works thanks to a lot !!

Azik left a reply on Insert Additional Pivot Table Attributes

in pivot table i insert branch_id and working_mode_id without problem but, i can't add other two columns data!!

Azik left a reply on Insert Additional Pivot Table Attributes

Argument 1 passed to Illuminate\Database\Eloquent\Relations\BelongsToMany::save() must be an instance of Illuminate\Database\Eloquent\Model, array given, called in

this line gives an error.. $branchs->workingModes()->save($workingModes,['time_start' => $time_start, 'time_finish' => $time_finish]);

Azik left a reply on Insert Additional Pivot Table Attributes

I tried useing save but it gives me an error.

$workingModes = $request->input('workingModes'); $time_start = $request->input('time_start'); $time_finish = $request->input('time_finish'); $branchs->workingModes()->save($workingModes,['time_start' => $time_start, 'time_finish' => $time_finish]);

Azik started a new conversation Insert Additional Pivot Table Attributes

Hi I am working with Eloquent many-to-many relations. I've created pivot table with some additional attributes such as time_start, time_finish and time stamps. I am trying to insert pivot table row with some additional column values..

Branch model

public function workingModes()
  {
  return $this->belongsToMany('App\Models\WorkingMode')
  ->withPivot('time_start','time_finish')
  ->withTimestamps();
  }

WorkingMode Model

public function branches() { return $this->belongsToMany('App\Models\Branch') ->withPivot('time_start', 'time_finish') ->withTimestamps(); }

and the request coming from view

"workingModes" => array:4 [▼ 0 => "1" 1 => "2" 2 => "3" ] "time_start" => array:3 [▼ 0 => "8-00" 1 => "9-00" 2 => "10-00" ] "time_finish" => array:3 [▼ 0 => "21-00" 1 => "22-00" 2 => "23-00" ]e guide me how to do that?

Thanks

20 Sep
8 months ago

Azik started a new conversation Image Upload To Pivot Table

I have cars , images and car_image tables in addController.php I get an array of images name and save to storage floder. store function

  public function store(Request $request)
  {   
      $imageall = [];
      $array = [];
    $this->validate($request, [
      'profile_image.*' => 'image|mimes:jpeg,png,jpg,gif|max:2048',
    ]);
    $car = Car::create([
          'user_id' => $request->user_id,
        ]);   
  if ($request->hasFile('profile_image')) {
    foreach ($this->uploadImage($request) as $image) {
      $array[] = Photo::create(['image' => $image])->id;
      }
      $car->images()->attach($array);
    }
      $car->options()->attach($request->options);
    return redirect()->back()->with('success', "image successfully uploaded!!");
  }

and uploadImage function

 protected function uploadImage($request){
    $imageall = [];
      foreach($request->file('profile_image') as $file){
        $filenamewithextension = $file->getClientOriginalName();
        $extension = $file->getClientOriginalExtension();
        $filenametostore = 'getauto_'.uniqid().'.'.$extension;
        $imageall[] = $filenametostore;
        Storage::put('public/cars/'. $filenametostore, fopen($file, 'r+'));
        Storage::put('public/cars/thumb/'. $filenametostore, fopen($file, 'r+'));
        $thumbnailpath = public_path('storage/cars/thumb/'.$filenametostore);
        $mainimagepath = public_path('storage/cars/'.$filenametostore);
        }
        return $imageall;
     }

the problem is updating function how can i update and delete which related user images ??

Azik left a reply on What Is The Problem On My Php Code!!

i cant see code??

20 Jul
10 months ago

Azik left a reply on How To Set A Cookie With Laravel 5?

namespace ** use Illuminate\Support\Facades\Input; ** ** use Illuminate\Http\Request; **

and function ** public function regionCookie(Request $request) { $region = Input::get('region'); return redirect()->back()->withCookie(cookie('region', $region,10));; } **