matheenulla

matheenulla

Member Since 1 Month Ago

bangalore

junior web developer at Bangalore

Experience Points 780
Experience Level 1

4,220 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 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.

19 Sep
1 day ago

matheenulla started a new conversation How To Retrieve Particular Column In Blade From JSON Format

In Mysql database, it is storing data in JSON format I want to fetch that data to blade view.

in the database, it is storing like this

    {"attributes":{"brand_name":"spar","brand_status":"Active"},"old":{"brand_name":"sparx","brand_status":"Active"}}

my controller

public function index(){

    $lastActivity = Activity::latest()->paginate(15);
    return view('activitylog.index',compact('lastActivity'));
}
13 Sep
1 week ago

matheenulla left a reply on I Want To Display 10 Records Per Page While Exporting To PDF (laravel-snappy)

@skauk thanks you very very much bro it is working fine.

matheenulla started a new conversation I Want To Display 10 Records Per Page While Exporting To PDF (laravel-snappy)

this is my controller

public function export() {

    $brand = Brands::all();
    $pdf = PDF::loadView('brands.exportpdf',compact('brand'));
    return $pdf->stream();
}

my view

  <table class="table" border="1" style="width:100%">
         <thead>
            <tr>
            <th scope="col">SL NO</th>
            <th scope="col">NAME</th>
            <th scope="col">STATUS</th>
            </tr>
        </thead>
        <tbody>
        @php ($i=1)
        @foreach($brand->all() as $brand)
                    <tr>
                        <td>{{$i}}</td>
                        <td>{{$brand->brand_name}}</td>
                        <td>{{$brand->brand_status}}</td>
                    </tr>
                    
            @php ($i++)  
         @endforeach    
        
        </tbody>
        </table>

how to display only 10 records per page in pdf file

10 Sep
1 week ago

matheenulla left a reply on Illuminate\Support\Collection Object ( [items:protected] => Array ( ) )

@tykus @resin thank you for replying.

I have done a silly mistake by mismatching the column name.

matheenulla started a new conversation Illuminate\Support\Collection Object ( [items:protected] => Array ( ) )

my controller

 $template = DB::table('email_setups')->where('email_template','when claim is created')->get();
    print_r($template);

I am getting this error Illuminate\Support\Collection Object ( [items:protected] => Array ( ) )

matheenulla left a reply on Property [email] Does Not Exist On This Collection Instance.

@nakov thank you very very much I was trying from yesterday now it is working fine.

matheenulla started a new conversation Property [email] Does Not Exist On This Collection Instance.

this is my controller

public function index(){

    $email1 = DB::table('email_setups')->where('type_of_setup','when claim is created')->get();

    foreach($email1 as $email)
    {
        $role_id = $email->role_id;

        $roles = DB::table('email_setups')->join('roles', function($join) use($role_id){
            $join->on('email_setups.role_id','=','roles.id')->where('roles.id','=',$role_id);
        })  ->first();  

        $role_names = $roles->name;  

        $userdetails[] = User::role($role_names)->get();

    }
    foreach($userdetails as $userdetails)
    {
        $allemails[] = $userdetails->email;
    }
    echo "<pre>";
    print_r($allemails);
    echo "<pre>";
  
   
   

   /* $emailsetup = EmailSetup::all();
    return view('emailsetup.index',compact('emailsetup'));*/
}

I am getting all user details but I am not getting particular column like(email,name...etc)

07 Sep
1 week ago

matheenulla left a reply on Laravel JWT Package Error In Postman Method Illuminate\\Auth\\SessionGuard::factory Does Not Exist

now it's working after creating two different routes (web.php and api.php ) and controllers. @bobbybouwmann Thank you

06 Sep
2 weeks ago

matheenulla left a reply on Laravel JWT Package Error In Postman Method Illuminate\\Auth\\SessionGuard::factory Does Not Exist

Thanks for replying.

I change default guard from web to api then it was working only in postman. if I change default guard from api to web then it working only on web, not in postman.

It has to work on both

matheenulla started a new conversation Laravel JWT Package Error In Postman Method Illuminate\\Auth\\SessionGuard::factory Does Not Exist

Auth.php

 'defaults' => [
    'guard' => 'web',
    'passwords' => 'users',
   ],  

   'guards' => [
      'web' => [
         'driver' => 'session',
          'provider' => 'users',
      ],

    'api' => [
        'driver' => 'jwt',
        'provider' => 'users',
        'hash' => false,
        ],
   ],

AuthController.php

class AuthController extends Controller
{
public function __construct()
{
    $this->middleware('auth:api', ['except' => ['login']]);
}

/**
 * Get a JWT via given credentials.
 *
 * @return \Illuminate\Http\JsonResponse
 */
public function login()
{
    $credentials = request(['email', 'password']);

    if (! $token = auth()->attempt($credentials)) {
        return response()->json(['error' => 'Unauthorized'], 401);
    }

    return $this->respondWithToken($token);
}

/**
 * Get the authenticated User.
 *
 * @return \Illuminate\Http\JsonResponse
 */
public function me()
{
    return response()->json(auth()->user());
}

/**
 * Log the user out (Invalidate the token).
 *
 * @return \Illuminate\Http\JsonResponse
 */
public function logout()
{
    auth()->logout();

    return response()->json(['message' => 'Successfully logged out']);
}

/**
 * Refresh a token.
 *
 * @return \Illuminate\Http\JsonResponse
 */
public function refresh()
{
    return $this->respondWithToken(auth()->refresh());
}

/**
 * Get the token array structure.
 *
 * @param  string $token
 *
 * @return \Illuminate\Http\JsonResponse
 */
protected function respondWithToken($token)
{
    return response()->json([
        'access_token' => $token,
        'token_type' => 'bearer',
        'expires_in' => auth()->factory()->getTTL() * 60
    ]);
}

}

It is working on the web, not in postmant it gives the error as Illuminate\Auth\SessionGuard::factory does not exist

05 Sep
2 weeks ago

matheenulla left a reply on App\Http\Controllers\api\AcademicApiController Does Not Exist

thank you very much now its working

matheenulla left a reply on App\Http\Controllers\api\AcademicApiController Does Not Exist

now i change to this App\Http\Controllers\api now its working

matheenulla started a new conversation App\Http\Controllers\api\AcademicApiController Does Not Exist

Hi I am new to laravel API and I am getting this error

api.php file

  Route::get('/academic','api\[email protected]');

Controller

namespace App\Http\Controllers;

use Illuminate\Http\Request; use App\Academic;

class AcademicApiController extends Controller {

public function index(){

    $academic = Academic::all();
    return response()->json($academic,200);
}

}

04 Sep
2 weeks ago
03 Sep
2 weeks ago

matheenulla left a reply on Image Not Uploading

@snapey Thank you it's working

matheenulla started a new conversation Image Not Uploading

public function store(Request $request) { $this->validate($request,[ 'image' => 'required|image|mimes:jpeg,png,jpg,gif|max:2048' ]);

    $image = $request->file('image');
    $name = rand().'.'.$image->getClientOriginalExtension();

    if(file_exists(public_path("images2")))
    {
        $image->move(public_path("images2"),$name);
    }
    else
    {
        $image->move(public_path(mkdir("images2")),$name);
     
    }
}

In the above code if directory exists then the image is moving to the path. Else block code not working only directory is created but image is not moving.

31 Aug
2 weeks ago

matheenulla left a reply on How To Make Text Bold In Laravel Blade Template

try this one

 <b>   {{$accepted_invitation->first_name }}   </b>
29 Aug
3 weeks ago

matheenulla left a reply on Laravel Permission Package Issue

In blade, it will come like this

       @role('writer')
                I am a writer!
        @endrole

If u have many roles u can do it

          @role('writer/editor')
                I am a writer and editor!
        @endrole
28 Aug
3 weeks ago

matheenulla started a new conversation Laravel Auditing Package Working Only On User Model And Not Working On Other Models

If I try to put on another model only new created record is auditing. Update, delete is not working.

24 Aug
3 weeks ago

matheenulla started a new conversation How To Store Dropdown Selected Id In Database Not Value In Laravel

       <option >Academics</option>
       @foreach($academic as $aca)
       <option id="{{$aca->id}}" value="{{$aca->name}}">{{$aca->name}}</option>
       @endforeach
       
       </select>
20 Aug
1 month ago

matheenulla left a reply on Undefined Variable: Class

thank you very much it is working now

matheenulla started a new conversation Undefined Variable: Class

public function viewatten($date,$class) {

       $records = DB::table('students')->join('attendances' , function($join){

        $join->on('students.class','=',$class)->where('attendances.attendance_date','=', $date);

    })->get();
    
    print_r($records);

   //return view('attendance.view',compact('student','attendance'));
   

}

the error I am getting in Undefined variabe class and date

18 Aug
1 month ago

matheenulla left a reply on Foreign Key Constraint Not Working

After migrating I have deleted the migration file of students table

17 Aug
1 month ago

matheenulla left a reply on Foreign Key Constraint Not Working

2014_1012000000create_users_table.php 2014_1012_100000create_password_resets_table.php 201908_14_105904_create_permission_tables.php 201908_14_114112_create_principals_table.php 201908_16_124145_create_parent_names_table.php 2019_08_17_070731_add_foreign_key.php

matheenulla left a reply on Foreign Key Constraint Not Working

yes, I am doing in migration. when I run PHP artisan migrate command it is giving me below error

Migrating: 2019_08_17_070731_add_foreign_key

Illuminate\Database\QueryException : SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (schoolmanagement.#sql-314_2c, CONSTRAINT students_parentsid_foreign FOREIGN KEY (parentsid) REFERENCES parent_names (id) ON DELETE CASCADE) (SQL: alter table students add constraint students_parentsid_foreign foreign key (parentsid) references parent_names (id) on delete cascade)

at C:\xampp\htdocs\schoolmanagement\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664 660| // If an exception occurs when attempting to run a query, we'll format the error 661| // message to include the bindings with SQL, which will make this exception a 662| // lot more helpful to the developer instead of just the database's errors. 663| catch (Exception $e) {

664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), $e 666| ); 667| }

matheenulla left a reply on Foreign Key Constraint Not Working

yes bro table already created

matheenulla started a new conversation Foreign Key Constraint Not Working

I am new to Laravel while adding a new column to the existing table it is giving me the error.

Illuminate\Database\QueryException : SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (schoolmanagement.#sql-314_2c, CONSTRAINT students_parentsid_foreign FOREIGN KEY (parentsid) REFERENCES parent_names (id) ON DELETE CASCADE) (SQL: alter table students add constraint students_parentsid_foreign foreign key (parentsid) references parent_names (id) on delete cascade)

My model

Schema::table('students', function (Blueprint $table) {

        $table->unsignedBigInteger('parentsid')->after('id');
        $table->foreign('parentsid')->references('id')->on('parent_names')->onDelete('cascade');

        //
    });

public function down() { Schema::table('students', function (Blueprint $table) { // }); }