tomopongrac

tomopongrac

Croatia

Member Since 4 Years Ago

Experience Points 241,600
Experience
Level
Lessons Completed 695
Lessons
Completed
Best Reply Awards 406
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.

15 Nov
1 day ago

tomopongrac left a reply on Undefined Index - But Index Is Present

What do you get when you var_dump $result

$response = urldecode($response); $result = array(); parse_str($response, $result);

dd($result);

return array('month' => $month, 'rate' => $result['rate'], // this is where the script crashes 'ssv' => $result['ssv']);

11 Oct
1 month ago

tomopongrac left a reply on TokenMismatchException

You must define token in your form

More details you have in documentation

https://laravel.com/docs/5.7/csrf#csrf-introduction

09 Oct
1 month ago

tomopongrac left a reply on Undefined Property: Controller::$Property

property is case sensitive

$creator_id = $this->creatorID;
01 Oct
1 month ago

tomopongrac left a reply on Post Route Doesnt Work

Does is work when you remove middleware?

03 Sep
2 months ago

tomopongrac left a reply on Do You Know Why It Is Appearing "Trying To Get Property Of Non-object"?

It looks like you dont have registration with that id

tomopongrac left a reply on Error 404, While Routes Exist...

Can you paste code for form where you update password ... maybe you did not put method put

29 Aug
2 months ago

tomopongrac left a reply on Factory Dummy 100 Records Without Creating 100 Users The Same Time

Try this

$factory->define(App\Language::class, function (Faker $faker) {

    $user = factory(App\User::class)->create();
    return [
         'user_id' => $user->id,            

        'name' => $faker->languageCode,
    ];

});
21 Aug
2 months ago

tomopongrac left a reply on Not Same Content On My Server And My Local Site

Is that content in .gitignore file ...

tomopongrac left a reply on Any Way To Write This Return Statement Shorter

You can

return $this->end_date && Carbon::createFromFormat('Y-m-d', $this->end_date)->diffInMonths(Carbon::now()) == 2;
02 Aug
3 months ago

tomopongrac left a reply on How To Get Date Accessed

You can do that with php function fileatime

http://php.net/manual/en/function.fileatime.php

30 Jul
3 months ago

tomopongrac left a reply on Undefined Variable When I Used Two Database.

Try this

 return view('school.edit', compact('school','personnels','district'));
18 Jul
3 months ago

tomopongrac left a reply on Check The Model's Column Names

You can with

if(Schema::hasColumn('users', 'email')) ; //check whether users table has email column
{

}
13 Jul
4 months ago

tomopongrac left a reply on Set Cookie On Ajax Post Request

Check this link how you can check if cookie exist with javascript

https://stackoverflow.com/questions/5968196/check-cookie-if-cookie-exists

tomopongrac left a reply on Set Cookie On Ajax Post Request

In your view you can check if cookie exist and then you can remove button for voting ...

tomopongrac left a reply on Format Phone Number In Laravel Blade

If you get phone number form database you can use model accessor

https://laravel.com/docs/5.6/eloquent-mutators#defining-an-accessor

tomopongrac left a reply on Retrieving BelongsTo Relationship

You can access with this code

$assignment->category
12 Jul
4 months ago

tomopongrac left a reply on Phpunit Testing Not Firing?

did you you install phpunit

https://phpunit.de/getting-started-with-phpunit.html

Try

php vendor/bin/phpunit
11 Jul
4 months ago

tomopongrac left a reply on Unable To Pass Array In Mailable

Try this

$userArray = collect(array('points' => $points, 'username' => $details->username));
                    Mail::to(config($details->username))->send(new CloseReportGood($userArray));

tomopongrac left a reply on "Class Config Does Not Exist" When Run Php Artisan Config:cache

Did you run compoer install

php composer install
10 Jul
4 months ago

tomopongrac left a reply on Undefined Variable

Try

return view('exam.submitPaper', ["subjectMarks" => "subjectMarks"]);

https://laravel.com/docs/5.6/views#passing-data-to-views

06 Jul
4 months ago

tomopongrac left a reply on Can't Save Records For One To Many Relationship In Laravel

Change this line of code ...

$city->country_id = $request->country_id;

tomopongrac left a reply on Syntax Error Or Access Violation: 1305 FUNCTION Projet2.input Does Not Exist

The problem is in this line of code and this string "input('tache_id')" where mysql thinks that is a function

 $tarification = DB::select("select * FROM tarificationtaches where 
    technicien_id = 'technicien_id' and tache_id = input('tache_id')");

What do you want to get with that query

tomopongrac left a reply on Routing Not Happening As Per Route

It looks like your method update did not execute ...

do you in your form put method "PUT"

05 Jul
4 months ago

tomopongrac left a reply on Extends If Else, Extends Another

Try

@auth
    @extends('one')
@endauth

@guest
    @extends('two')
@endguest

https://laravel.com/docs/5.6/blade#if-statements

04 Jul
4 months ago

tomopongrac left a reply on Method Illuminate\Database\Query\Builder::userResponse Does Not Exist. After Composer Dump-autoload.

Can you show the code ...

is method userResponse relationship?

tomopongrac left a reply on Get All The Other Id In Find()

@haizone

Maybe there is but find method is just a wrapper around where method

// Illuminate\Database\Query\Builder

    public function find($id, $columns = ['*'])
    {
        return $this->where('id', '=', $id)->first($columns);
    }

tomopongrac left a reply on Get All The Other Id In Find()

You have method whereNotIn()

Try

$businessproduct->branches()-> whereNotIn('id', [1,2,3])->get();
29 Jun
4 months ago

tomopongrac left a reply on DB:seed Error

This is from documentation

http://laratrust.readthedocs.io/en/5.0/configuration/models/role.html

<?php

namespace App;

use Laratrust\Models\LaratrustRole; // <-- change this line

class Role extends LaratrustRole
{
}

tomopongrac left a reply on Test Transactions In Laravel

Try put DB::beginTransaction() before try block

DB::beginTransaction();

try {
                   
                $drugInventory = DrugInventory::create([
                    'service_pro_id' => $service_pro_id,
                    'brand_name' => $brand_name,
                    'manufacturer' => $manufacturer,
                ]);

                $drug_entities = new DrugEntity;
                $drug_entities->tpe = $type;    //here I have written tpe instead of type

                $drug_entities->save();


                

                DB::commit();


            } catch( Exception $e ) {
                DB::rollback();
                echo $e->getMessage();
            }
27 Jun
4 months ago

tomopongrac left a reply on Failed To Open Stream: No Such File Or Directory

did you put namespace in controller

<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;

https://laravel.com/docs/5.6/controllers

tomopongrac left a reply on Little Service In Laravel

No, you must use "use" ... or you can

\App\Extensions\Breadcrumbs\BreadcrumbsBreadcrumbs::add($post->full_url, $post->short_name);

tomopongrac left a reply on How Can I Implement "LIKE" Clause In My Sql Statement In PDO Style Named Bindings.

You can try this ...

...
$name = "%Manny%";
$query = "SELECT name FROM `user ` WHERE `name` like :name";
$stmt = $conn->prepare($query);
$stmt->bindParam(':name',$name);
$stmt->execute();

tomopongrac left a reply on How To Check For Empty Array

For the empty collection you can check with

$gallery->isEmpty();

or

if ($gallery->count()) {
    // do something
}
26 Jun
4 months ago

tomopongrac left a reply on Column Not Found: 1054 Unknown Column

In your interventions_tables you have a error .. try with

...
 $table->integer('tarificationtaches_id')->unsigned();
$table->foreign('tarificationtaches_id')->references('id')- 
        >on('tarificationtaches');
...
11 Jun
5 months ago

tomopongrac left a reply on Your Connection Is Not Secure

Try change your site to .test instead of .app

tomopongrac left a reply on How To Create A New Function In Resource Controller In Laravel?

In your controller you create function

    public function open()
    {
        // your code
    }

and then in your route file add

Route::get('open', '[email protected]');

tomopongrac left a reply on How To Insert Multiple Records Under A Id In Laravel

if you use eloquent you can create relationship

https://laravel.com/docs/5.6/eloquent-relationships#one-to-many

or if you want to use laravel query builder in your tbl_order_details table create field order_id ...

08 Jun
5 months ago

tomopongrac left a reply on Calling A Method Variable

From where do you call that method ... if is from the same class you need to use $this

$report_list = $this->getDeactivatedInfo($report_fields);

tomopongrac left a reply on HTTP To HTTPS

Try this

RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/ [R=301,L]
07 Jun
5 months ago

tomopongrac left a reply on What Is Best Css Framework?

Did you try tailwindcss.com

https://tailwindcss.com

tomopongrac left a reply on How To Insert Multiple Rows In Mysql Using Laravel

You can use insert method which accept array as argument

Semester1::insert($data);