chagouani

@mballaag

[2018-06-14 13:33:53] local.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'technicien_id' in 'where clause' (SQL: select * from metiers where technicien_id = 2 and metiers.deleted_at is null order by libelle_metier asc) {"exception":"[object] (Illuminate\Database\QueryException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'technicien_id' in 'where clause' (SQL: select * from metiers where technicien_id = 2 and metiers.deleted_at is null order by libelle_metier asc) at C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'technicien_id' in 'where clause' at C:\xampp\htdocs\projet\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:79

mballaag

@chagouani cet erreur ne concerne pas le create.blade. celle que vous envoyee est dejà résolu actuelement.

je voudrais la liste d'erreur. vous pouvez par exemple faire un test de la plateforme et me montrez ce qu'il y a dans les fichiers de log d'aujourd'hui le 15/06/2018

chagouani

@mballaag maintenant j'ai afficher la liste des technicien puis j'ai appuier suer le bouton ajouter tarification pour accceder à notre interface tarification tache j'ai us cette erreur

"Trying to get property of non-object (View: 
    C:\xampp\htdocs\projet\resources\views\tarification\create.blade.php)" 

et voila le fichier log

[2018-06-15 23:07:06] local.ERROR: Trying to get property of non-object (View: C:\xampp\htdocs\projet\resources\views\tarification\create.blade.php) {"exception":"[object] (ErrorException(code: 0): Trying to get property of non-object (View: C:\xampp\htdocs\projet esources\views\tarification\create.blade.php) at C:\xampp\htdocs\projet\storage\framework\views\693a3f0d31735a2b8d627760cad9675360196a8e.php:74, ErrorException(code: 0): Trying to get property of non-object at C:\xampp\htdocs\projet\storage\framework\views\693a3f0d31735a2b8d627760cad9675360196a8e.php:74) [stacktrace] #0 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\View\Engines\PhpEngine.php(45): Illuminate\View\Engines\CompilerEngine->handleViewException(Object(ErrorException), 1) #1 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\View\Engines\CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath('C:\\xampp\\htdocs...', Array) #2 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\View\View.php(137): Illuminate\View\Engines\CompilerEngine->get('C:\\xampp\\htdocs...', Array) #3 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\View\View.php(120): Illuminate\View\View->getContents() #4 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\View\View.php(85): Illuminate\View\View->renderContents() #5 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Http\Response.php(42): Illuminate\View\View->render() #6 C:\xampp\htdocs\projet\vendor\symfony\http-foundation\Response.php(201): Illuminate\Http\Response->setContent(Object(Illuminate\View\View)) #7 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Router.php(724): Symfony\Component\HttpFoundation\Response->__construct(Object(Illuminate\View\View)) #8 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Router.php(698): Illuminate\Routing\Router::toResponse(Object(Illuminate\Http\Request), Object(Illuminate\View\View)) #9 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Router.php(658): Illuminate\Routing\Router->prepareResponse(Object(Illuminate\Http\Request), Object(Illuminate\View\View)) #10 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(30): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #11 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Middleware\SubstituteBindings.php(41): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #12 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure)) #13 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #14 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(67): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #15 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure)) #16 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #17 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #18 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #19 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #20 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(63): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #21 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #22 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #23 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #24 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure)) #25 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #26 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(59): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #27 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure)) #28 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #29 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #30 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Router.php(660): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #31 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Router.php(635): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request)) #32 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Router.php(601): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route)) #33 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Router.php(590): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request)) #34 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(176): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) #35 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request)) #36 C:\xampp\htdocs\projet\vendor\fideloper\proxy\src\TrustProxies.php(56): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #37 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure)) #38 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #39 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #40 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure)) #41 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #42 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #43 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure)) #44 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #45 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ValidatePostSize.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #46 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure)) #47 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #48 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #49 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure)) #50 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #51 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #52 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\Foundation\Http\ Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #53 C:\xampp\htdocs\projet\vendor\laravel\framework\src\Illuminate\ Foundation\Http\Kernel.php(116): Illuminate\Foundation\Http\Kernel- >sendRequestThroughRouter(Object(Illuminate\Http\Request)) #54 C:\xampp\htdocs\projet\public\index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #55 {main} "}

chagouani

@mballaag mais avec ce code j'ai plus d'erreur mais il m'affiche la liste de tous les metier pas les metier du technicien selectionné

controller

 public function create($technicien_id)   
{
    $technicien = technicien::orderBy('id','desc')->get();
    $taches = Tache::orderBy('libelle_tache', 'asc')->get();
    $metiers = Metier::orderBy('libelle_metier', 'asc')->get();
    return view('tarification.create')->with('taches', $taches)->with('technicien', 
    $technicien)->with('metiers', $metiers)->with('technicien_id', $technicien_id);
}

create.blade.php

<div class="form-group">
            <div class="col-md-12">
                    <div class="col-md-4">
            <label>Metier: </label>
            <select onchange="getTachesByMetier(this.value)" style="width: 
            200px" class="productm form-control" id="metiers">
                <option value="">-Select-</option>
            @foreach($metiers as $metier)
                  <option value={{$metier->id}}>{{$metier->libelle_metier}}</option>
            @endforeach
           </select>
        </div>
mballaag

@chagouani je ne sais pas si c'est normal que vous n'ayez plus d'erreur puisque c'est la même collection. mais c'est normal qu'il affiche tous les metiers puisque c'est ce que vous demander dans le controller. en créant $metiers notamment. je vois dans le code des références au cache essaye de rentrer sur mon ancien code et tu clear le cache avec la commande.

php artisan cache:clear

et vous relancez l'operation

Please sign in or create an account to participate in this conversation.