tomopongrac

Experience

237,690

404 Best Reply Awards

  • Member Since 3 Years Ago
  • 673 Lessons Completed
  • 7 Favorites

3rd September, 2018

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

It looks like you dont have registration with that id

tomopongrac left a reply on Error 404, While Routes Exist... • 2 weeks ago

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

1st September, 2018

29th August, 2018

tomopongrac left a reply on Factory Dummy 100 Records Without Creating 100 Users The Same Time • 3 weeks ago

Try this

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

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

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

});

21st August, 2018

tomopongrac left a reply on Not Same Content On My Server And My Local Site • 4 weeks ago

Is that content in .gitignore file ...

tomopongrac left a reply on Any Way To Write This Return Statement Shorter • 4 weeks ago

You can

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

2nd August, 2018

tomopongrac left a reply on How To Get Date Accessed • 1 month ago

You can do that with php function fileatime

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

30th July, 2018

tomopongrac left a reply on Undefined Variable When I Used Two Database. • 1 month ago

Try this

 return view('school.edit', compact('school','personnels','district'));

18th July, 2018

tomopongrac left a reply on Check The Model's Column Names • 2 months ago

You can with

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

}

13th July, 2018

tomopongrac left a reply on Set Cookie On Ajax Post Request • 2 months ago

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 • 2 months ago

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 • 2 months ago

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 • 2 months ago

You can access with this code

$assignment->category

12th July, 2018

tomopongrac left a reply on Phpunit Testing Not Firing? • 2 months ago

did you you install phpunit

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

Try

php vendor/bin/phpunit

11th July, 2018

tomopongrac left a reply on Unable To Pass Array In Mailable • 2 months ago

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 • 2 months ago

Did you run compoer install

php composer install

10th July, 2018

tomopongrac left a reply on Undefined Variable • 2 months ago

Try

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

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

tomopongrac left a reply on How To Validate Double Values? • 2 months ago

6th July, 2018

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

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 • 2 months ago

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 • 2 months ago

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

do you in your form put method "PUT"

5th July, 2018

tomopongrac left a reply on Extends If Else, Extends Another • 2 months ago

Try

@auth
    @extends('one')
@endauth

@guest
    @extends('two')
@endguest

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

4th July, 2018

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

Can you show the code ...

is method userResponse relationship?

tomopongrac left a reply on Get All The Other Id In Find() • 2 months ago

@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() • 2 months ago

You have method whereNotIn()

Try

$businessproduct->branches()-> whereNotIn('id', [1,2,3])->get();

29th June, 2018

tomopongrac left a reply on DB:seed Error • 2 months ago

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 • 2 months ago

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();
            }

27th June, 2018

tomopongrac left a reply on Failed To Open Stream: No Such File Or Directory • 2 months ago

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 • 2 months ago

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. • 2 months ago

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 • 2 months ago

For the empty collection you can check with

$gallery->isEmpty();

or

if ($gallery->count()) {
    // do something
}

26th June, 2018

tomopongrac left a reply on Column Not Found: 1054 Unknown Column • 2 months ago

In your interventions_tables you have a error .. try with

...
 $table->integer('tarificationtaches_id')->unsigned();
$table->foreign('tarificationtaches_id')->references('id')- 
        >on('tarificationtaches');
...

11th June, 2018

tomopongrac left a reply on Your Connection Is Not Secure • 3 months ago

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? • 3 months ago

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 • 3 months ago

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 ...

8th June, 2018

tomopongrac left a reply on Calling A Method Variable • 3 months ago

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 • 3 months ago

Try this

RewriteEngine On

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

7th June, 2018

tomopongrac left a reply on What Is Best Css Framework? • 3 months ago

Did you try tailwindcss.com

https://tailwindcss.com

tomopongrac left a reply on How To Insert Multiple Rows In Mysql Using Laravel • 3 months ago

You can use insert method which accept array as argument

Semester1::insert($data);

tomopongrac left a reply on Install Error • 3 months ago

did you try that command with sudo

25th May, 2018

tomopongrac left a reply on Need Tips On How To Handle Form Spam Submit • 3 months ago

With javaScript you can disable button after user click them...

12th May, 2018

tomopongrac left a reply on Nothing To Migrate • 4 months ago

Do you enter correct information for connecting to database on your production server

8th May, 2018

tomopongrac left a reply on "Parse Error: Syntax Error, Unexpected '$moyenne' (T_VARIABLE)" • 4 months ago

In your show file ... does this in same line

<label id="prenom" type="text" class="form-control" name="user[prenom]" >{{ $moyenne }}</label>

tomopongrac left a reply on "Parse Error: Syntax Error, Unexpected '$moyenne' (T_VARIABLE)" • 4 months ago

try in your controller this ...

return view('technicien.show')->with('user',$user)- 
 >with('metier',$metier)->with('zoneintervention',$zoneintervention)- 
 >with('tarificationtache',$tarificationtache)->with('moyenne',$moyenne)->with('technicien',$technicien);

26th April, 2018

tomopongrac left a reply on Javascript Is Not Working. • 4 months ago

did you try

mix.scripts([
    'resources/assets/js/Sidebar.js',
    'resources/assets/js/app.js'
], 'public/js/all.js');
Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.