afrasiyabhaider

afrasiyabhaider

Web Developer at Self Employed

Member Since 7 Months Ago

Gujrat

Experience Points
3,000
Total
Experience

2,000 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
15
Lessons
Completed
Best Reply Awards
0
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,000 XP
Nov
16
1 day ago
Activity icon

Replied to SoftDelete Issues

Try

$site = Site::withTrashed()->all();

Nov
14
3 days ago
Activity icon

Started a new Conversation Issue In HasMany() Relationship

Can anyone please tell me how to updateOrCreate() on an array in hasMany() relationship?

Nov
13
4 days ago
Activity icon

Started a new Conversation How To Build Schema For Student, Course And Class Relation?

I want to allocate courses to

  • students
  • class
  • course
I basically want to make the relation of

    - courses with class
    - class with students

so students should have all courses which are taught in the chosen class but some of the students might not be allowed to study a few courses allocated to the class

please guide me on how to create the schema for this situation?

Activity icon

Awarded Best Reply on One Model Having 'hasMany' Relation With Multiple Model

@ there is a code for storing student but it is still not working

$student->save();
Nov
02
2 weeks ago
Activity icon

Replied to How To Get Files InLaravel Controller As Normal File Element By Using FilePond.js?

@sinnbeck Thank you I want to convert this file into PDF and then store it. Can you suggest me something for that?

Activity icon

Replied to How To Get Files InLaravel Controller As Normal File Element By Using FilePond.js?

@mstrauss @sinnbeck I am implementing filepond.js and $request->input('file');response is as follows

{"id":"q8vlfi9eg","name":"P068.doc","type":"application/msword","size":41984,"metadata":{},"data":"0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABA...}
Nov
01
2 weeks ago
Activity icon

Started a new Conversation How To Get Files InLaravel Controller As Normal File Element By Using FilePond.js?

I want to send file to Laravel Controller along with other form fields data, but I am using FilePond.js [https://pqina.nl/filepond/] which sends file as an Async request.

I used FilePondPluginFileEncode plugin and I got file's data as Json object, But I am unable to store data because I didn't find any temp/location of the file.

Here is the Code I've tried

 $file = $request->input('file');
 $name = json_decode($file[0])->name;
 $data = substr($file[0], strpos($file[0], ',') + 1);
 $data = base64_decode($data);
 $storage = Storage::disk('local')->put($name, $data);
  • It stores empty files (with correct name and format)

  • I want to get file with in Laravel's Controller so I can send them to Google Drive

Oct
24
3 weeks ago
Activity icon

Started a new Conversation How To Remove Data But Not Permanently From Table?

Please guide me on how to remove data but ---not--- delete permanently from table??

Oct
20
4 weeks ago
Activity icon

Started a new Conversation Driver [google_drive] Is Not Supported.

I am using a package nao-pon/flysystem-google-drive:~1.1 for google drive api implementation and getting error which is mentioned above. I've also updated my config\filesystem.php file but error is still there.

Please tell me how to resolve this error

Oct
18
4 weeks ago
Activity icon

Replied to Best Resource To Implement Google Drive API ??

I've read the Documentation but I want tO know how tO implement it in Laravel. In a professional way.. Like there is a Login With google using Socialite so is there any other way.. any other package or anything???

Activity icon

Started a new Conversation Best Resource To Implement Google Drive API ??

I want to get and send data into google drive from my laravel application. Anyone can tell me that how to implement Google Drive Api in Laravel 6?

Oct
14
1 month ago
Activity icon

Started a new Conversation Default Authentication In Google API

I am building an application in which I will display lectures to students. Those Lectures should be on my Google Drive. So how can I prevent google OAuth screen to get Login Authentication of user. I dont want my user to be redirected to google consent screen.

Is there any solution?

Oct
04
1 month ago
Activity icon

Started a new Conversation How To Implement API Of Google Classroom??

I want to implement Google classroom's api can anyone please guide me with the process? I've read the documentation but I didn't understand how to do it in Laravel. can you guys please help me! Here is the link

https://developers.google.com/classroom/quickstart/php

Sep
04
2 months ago
Activity icon

Replied to One Model Having 'hasMany' Relation With Multiple Model

@ there is a code for storing student but it is still not working

$student->save();
Activity icon

Started a new Conversation One Model Having 'hasMany' Relation With Multiple Model

I have a student model in which I've created these two relations

- Student Model

    public function previous_academic_record()
    {
        return $this->hasMany(previous_academic_record::class);
    }
    public function student_guardians()
    {
        return $this->hasMany(student_guardians::class);
    }

I have two more models named as

  • previous_academic_record
  • student_guardians

which belongsTo students

- In the student guardian model

public function students()
    {
        return $this->belongsTo(students::class);
    }

- in the previous academic record model 

public function students()
    {
        return $this->belongsTo(students::class);
    }

now please tell me how to save records

when I write below code it does not save student_id (does not create a reference to student)

 $student = new stduents();

$student->previous_academic_record()->create([]);

and 

$student->studnet_guardians()->create([]);

Please tell me how to figure this out

Aug
30
2 months ago
Activity icon

Replied to How To Build Schema/model Of Tables For Student/Course Allocation

@malico thank you for your replay but I want to assign course to semester and then allocate semester to the student so a student can have all courses taught in selected semester.

Can you help me in understanding this scenario!

Activity icon

Started a new Conversation How To Build Schema/model Of Tables For Student/Course Allocation

I want to allocate courses to

  • students
  • semesters
I basically want to make the relation of

    - courses with semester
    - allocate semester to students

so students should have all courses which are taught in the chosen semester

please guide me on this

Aug
25
2 months ago
Activity icon

Replied to Need To Sort Prodcut By Price ASC And DESC

@r0.it

use following code inside controller -> products funtion

Product::orderBy('price','desc')->get();

problem solved

Activity icon

Started a new Conversation How To Update Or Create - HasMany/BelongsTo (One To Many) Relation

Please guide me on how to (update or create) student's previous academic record. I want to allow admin to add new academic record while updating the existing one as well that why I want to know about (createOrUpdate).

students Model

public function previous_academic_record()
    {
        return $this->hasMany(previous_academic_record::class);
    }


previous_academic_record Model

public function students()
    {
        return $this->belongsTo(students::class);
    }
Aug
22
2 months ago
Activity icon

Replied to Need Your Suggestion!

I am not familiar with anyone of these technologies I want to learn it and implement it

Activity icon

Replied to Need Your Suggestion!

I want to learn something new thats why I am asking from you guys as you have much experience and familiar with this kind of job

Cam you please guide me how to use Angular7 with Laravel 5.8?

Activity icon

Started a new Conversation Need Your Suggestion!

I am developing an application in Laravel, so I need a suggestion form you guys, what should I use for frontend Vue.Js or Angular7 in my project?

and please guide me about the Pros and Cons.

Aug
21
2 months ago
Activity icon

Replied to Laravel 5.8 With Angular7

Thank You @

Activity icon

Replied to Laravel 5.8 With Angular7

@ But I have an ongoing project in which 50% of work is already done and now PM told us to do the rest of the work with Angular7

Activity icon

Replied to Laravel 5.8 With Angular7

@alkut Thank you but I've already searched for this tutorial. JWT which is used in this tutorial is now replaced by the community member Open this link and read the announcement on top of the page

https://laravel-angular.io/docs/1/angular-install/

Could you please suggest me another tutorial in which Laravel and Angular are managed in Single Project and not deal as 2 different projects?

Activity icon

Started a new Conversation Laravel 5.8 With Angular7

Can anyone please suggest me some tutorial for learning laravel 5.8 with angular 7. I've searched on google but I didn't find anything interesting Could you guys please help me out?

Aug
19
2 months ago
Activity icon

Replied to How Should I Don't Show Login Form Of Teacher If Already Logged In As Student?

I write these lines into all of my login controllers (student, teacher, staff)

    $this->middleware('guest:staff')->except('logout');
    $this->middleware('guest:student')->except('logout');
    $this->middleware('guest:teacher')->except('logout');
Activity icon

Started a new Conversation How Should I Don't Show Login Form Of Teacher If Already Logged In As Student?

I am using the multi-auth system and I am facing the problem. If I logged in as a student and I type route of teacher login form my application takes me there. Please tell me

How should I don't Show login form of the teacher if already logged in as a student

Aug
12
3 months ago
Activity icon

Replied to Email Sending Error

By following instructions of below-given link, my emails are now successfully sending

https://derekbliss.com/post/laravel-streamsocketenablecrypto-ssl-operation-failed-with-code-1

Activity icon

Started a new Conversation Email Sending Error

I am getting this error while sending email

ErrorException thrown with message "stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed"

Aug
08
3 months ago
Activity icon

Replied to Login With Plain-text Instead Of Hashed Password

Because admin is registering students and teachers so admin is responsible to assign an initial password.

Activity icon

Replied to Login With Plain-text Instead Of Hashed Password

@martinbean you are right then what should be the initial password set by the admin while registering the student and teacher?

Activity icon

Replied to Login With Plain-text Instead Of Hashed Password

ok any other suggestion?

Activity icon

Replied to Login With Plain-text Instead Of Hashed Password

If the password is saved with a random number then how teacher/student will get their password if the password is stored with Hashing?

No invitation system is not in the requirement

Activity icon

Replied to Login With Plain-text Instead Of Hashed Password

I've got a solution now, guide me if I am wrong.

Admin has to enter the roll number/ teacher id, so initially, the roll number will be set as the password for student and teacher id will be set as a password for teacher and these things will be hashed and stored in the password column of teacher and student.

Should I go with this or you guys have some better option?

@abdk2r @tykus @click @

Activity icon

Replied to Login With Plain-text Instead Of Hashed Password

@click he is the admin so it's up to him that he wants to watch the password or not. Why should I force him not to watch the password of students and teachers :D

If you have any solution then please tell me.

Activity icon

Replied to Login With Plain-text Instead Of Hashed Password

@tykus do you have any better option then please suggest me

Activity icon

Replied to Login With Plain-text Instead Of Hashed Password

Client whish to see the password of all users if the password is hashed then it will not be understandable by the client or any human being. The problem of hashing is, it cannot be reversed into plain text so that's why password as a plain text is a requirement

Activity icon

Started a new Conversation Login With Plain-text Instead Of Hashed Password

I am developing a school portal and there are many entities who have separate record saved in separate DB e.g Teachers, Students, Staff

I want that every user should have a password as a plain text, not the hashed password. Tell me what to change in LoginController so it will check the plain text with password column rather than hashed text with password column while performing login

Client whish to see the password of all users if the password is hashed then it will not be understandable by the client or any human being. The problem of hashing is, it cannot be reversed into plain text so that's why password as a plain text is requirement

Jul
28
3 months ago
Activity icon

Started a new Conversation How To Create Route Of Login On The Basis Of Role Column?

I've created a column named as 'role' in Users table there are 3 roles student, teacher, admin I want that when the user enters his credentials he should be redirected to his home page e.g if email = [email protected] password = 1234

then the system should get his role from DB and redirect him to his respected home page (student/home)

Jul
27
3 months ago
Activity icon

Replied to Pagination Links Not Working In View

@bryan1671 Laravel has a built-in method to create pagination use the following code in your controller while getting data from DB

$posts = Post::orderBy('created_at','desc')->paginate(5 ); return view('posts.index')->with('posts',$posts);

use function : paginate('number_of_posts_per_page');

use the following code in your view

{{$posts->links()}}

Change the data according to your context

Hope it works well

Activity icon

Replied to Laravel 5.8 Error 404 | Not Found On Route When It Exists

@benbermingham You are using a Post method in your route but it should be (delete) instead of (post).

Route::delete('/training/availability/{$id}/delete', '[email protected]')->name('availability.delete');

After creating this route run the following command on terminal

php artisan route:list

just to make sure that your route is correct or not

Remember there are four basic route methods 1- get 2- post 3- put (for update) 4- delete

but if you want to work with all 4 methods just use resource

e.g Route::resource('route_name','controller_name');

Hope it will work as it worked for me

Activity icon

Started a new Conversation How To Migrate Specific Table Without Removing Data Of Other Tables?

I have students and roles table already in my DB. I've added a new table named as Course now, I want to migrate course table but I don't want to delete the data of already created tables.

Suggest me a solution if there is any.!

Jul
26
3 months ago
Activity icon

Started a new Conversation How To Handle "staff/{$id}/delete_role/{$id2}" This Route In Controller?

I want to get staff and role id to delete a role whos

model_has_role.staff_id = model_has_role.role_id

Jul
22
3 months ago
Activity icon

Replied to Permission System

Thank You <3

Jul
21
3 months ago
Activity icon

Started a new Conversation Permission System

I want to create a permission system for academic departments. Please tell me should i use some packages in laravel if so then which one is the best in Laravel?

May
20
5 months ago
Activity icon

Replied to How To Work With Google Classroom Api In Laravel

I've found how to connect with google classroom API

1- go to "https://developers.google.com/classroom/quickstart/php" and enable classroom API

2- Open terminal in VS code and write command "composer require google/apiclient:^2.0"

3- Go to "\vendor\google\apiclient\src\Google\Client.php" and setup API

4- Set values in Client.php class constructor (Line 92) e.g client_id, client_secret etc

5- Create a controller and write the following code in the Index function

$client = new Google_Client();

    $service = new Google_Service_Classroom($client);

    dd($service); // display data - check if service is created or not