PhoeniX5

PhoeniX5

Member Since 9 Months Ago

Experience Points
2,350
Total
Experience

2,650 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.

Level 1
2,350 XP
Sep
29
1 month ago
Activity icon

Replied to Vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php" Line: 179

@siangboon these are two fucntions : Controller :

public function Vadministration_gestion_utilisateurs()
    {
     return view('Admin_gestion_utilisateurs');
    }


public function getRole(Request $request)
    {
        $role_list = DB::table('roles')
        ->select('role_nom')
            ->groupBy('role_nom')
            ->get();
        $data = [
            'role_list'    => $role_list,
        ];
        return view('Admin_gestion_utilisateurs')->with($data);
    }

View :

<div class="form-group">
                                <label>Assigner le rôle de l'utilisateur</label>
                                <select name="role_id" id="role_id" required="required"
                                    class="form-control input-lg dynamic" data-dependent="poste_nom">
                                    <option value="">Spécifiez le rôle</option>
                                    @foreach($role_list as $role)
                                    <option value="{{ $role->role_nom}}">{{ $role->role_nom }}</option>
                                    @endforeach
                                </select>
                            </div>

Yeah I tried that and still same error.

Activity icon

Replied to Vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php" Line: 179

I am really out of Ideas I double checked everything and can't find a solution to this problem ;( I think this is due to the Ubuntu server because my application is working correctly when deploying on Windows, but it is too slow compared to Ubuntu server. What is strange when deploying in Ubuntu server is that one page of my application loads correctly with datatables, while the others continue to display this error, I assume that the datatables are working properly, I also checked uper and lower cases and it's clear, I don't know what else to do!?

Activity icon

Replied to Vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php" Line: 179

@resin Here is the result of what's showing :

{
    "message": "",
    "exception": "Symfony\Component\HttpKernel\Exception\NotFoundHttpException",
    "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php",
    "line": 179,
    "trace": [
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 634,
            "function": "match",
            "class": "Illuminate\Routing\RouteCollection",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 623,
            "function": "findRoute",
            "class": "Illuminate\Routing\Router",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 612,
            "function": "dispatchToRoute",
            "class": "Illuminate\Routing\Router",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 176,
            "function": "dispatch",
            "class": "Illuminate\Routing\Router",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 30,
            "function": "Illuminate\Foundation\Http\{closure}",
            "class": "Illuminate\Foundation\Http\Kernel",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/fideloper/proxy/src/TrustProxies.php",
            "line": 57,
            "function": "Illuminate\Routing\{closure}",
            "class": "Illuminate\Routing\Pipeline",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Fideloper\Proxy\TrustProxies",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "Illuminate\Pipeline\{closure}",
            "class": "Illuminate\Pipeline\Pipeline",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\Routing\{closure}",
            "class": "Illuminate\Routing\Pipeline",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\Foundation\Http\Middleware\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "Illuminate\Pipeline\{closure}",
            "class": "Illuminate\Pipeline\Pipeline",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\Routing\{closure}",
            "class": "Illuminate\Routing\Pipeline",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\Foundation\Http\Middleware\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "Illuminate\Pipeline\{closure}",
            "class": "Illuminate\Pipeline\Pipeline",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\Routing\{closure}",
            "class": "Illuminate\Routing\Pipeline",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\Foundation\Http\Middleware\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "Illuminate\Pipeline\{closure}",
            "class": "Illuminate\Pipeline\Pipeline",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php",
            "line": 62,
            "function": "Illuminate\Routing\{closure}",
            "class": "Illuminate\Routing\Pipeline",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "Illuminate\Pipeline\{closure}",
            "class": "Illuminate\Pipeline\Pipeline",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 104,
            "function": "Illuminate\Routing\{closure}",
            "class": "Illuminate\Routing\Pipeline",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 151,
            "function": "then",
            "class": "Illuminate\Pipeline\Pipeline",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 116,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\Foundation\Http\Kernel",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/public/index.php",
            "line": 55,
            "function": "handle",
            "class": "Illuminate\Foundation\Http\Kernel",
            "type": "->"
        },
        {
            "file": "/var/www/html/Raylan-gestion-magasin/server.php",
            "line": 21,
            "function": "require_once"
        }
    ]
}
Sep
26
1 month ago
Activity icon

Replied to Vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php" Line: 179

@resin It give me the same result as :

"ajax": "{{ route('administration.gestion_utilisateurs') }}",

With the same error.

Activity icon

Replied to Vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php" Line: 179

@resin when I call http://192.168.100.222:8000/Admin_gestion_utilisateurs/gestion_utilisateurs it shows only the data from database :

{"draw":0,"recordsTotal":3,"recordsFiltered":3,"data":[{"id":"1","username":"Admin","password":"y$JkjnEoOqgViMpzhllJGLMO2XVDgkJR7gJiSrxBkU5iCW56dFnwKSG","role":"Administrateur","poste_nom":"Administration","poste_id":0,"modifier":"<a href=\"#\" class=\"btn btn-xs btn-warning Modifier\" id=\"1\"><i class=\"glyphicon \nglyphicon-edit\"><\/i> Modifier<\/a>","supprimer":"<a href=\"#\" class=\"btn btn-xs btn-danger Supprimer\" id=\"1\"><i class=\"glyphicon \nglyphicon-minus\"><\/i> Supprimer<\/a>"},{"id":"2","username":"Sami","password":"y$dW..0wXaNMJheBpwvP3WyO\/9aDsdsf\/r4M16bX3P2GJ7hhZgWSSve","role":"Administrateur","poste_nom":"Administration","poste_id":0,"modifier":"<a href=\"#\" class=\"btn btn-xs btn-warning Modifier\" id=\"2\"><i class=\"glyphicon \nglyphicon-edit\"><\/i> Modifier<\/a>","supprimer":"<a href=\"#\" class=\"btn btn-xs btn-danger Supprimer\" id=\"2\"><i class=\"glyphicon \nglyphicon-minus\"><\/i> Supprimer<\/a>"},{"id":"17","username":"Ahmed","password":"yLARACASTS_SNIPPET_PLACEHOLDERvkgVxZcLncMKe13E1gtju40alGlGohqwSz17J3qT\/c9HtGJt1Ek.","role":"Inspecteur","poste_nom":"Inspection","poste_id":"1","modifier":"<a href=\"#\" class=\"btn btn-xs btn-warning Modifier\" id=\"17\"><i class=\"glyphicon \nglyphicon-edit\"><\/i> Modifier<\/a>","supprimer":"<a href=\"#\" class=\"btn btn-xs btn-danger Supprimer\" id=\"17\"><i class=\"glyphicon \nglyphicon-minus\"><\/i> Supprimer<\/a>"}],"input":[]}

But when I call http://192.168.100.222:8000/Administration/gestion_utilisateurs it displays my webpage with the error in my first post.

Activity icon

Replied to Vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php" Line: 179

@resin pls read my second post,

"ajax": "{{ route('administration.gestion_utilisateurs') }}",
Activity icon

Replied to Vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php" Line: 179

Here is all my route :

+--------+----------+---------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------+--------------+
| Domain | Method   | URI                                               | Name                                              | Action                                                                     | Middleware   |
+--------+----------+---------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------+--------------+
|        | GET|HEAD | /                                                 |                                                   | Closure                                                                    | web          |
|        | GET|HEAD | Admin_gestion_postes/addposte                     | administration.addposte                           | App\Http\Controllers\[email protected]                       | web          |
|        | GET|HEAD | Admin_gestion_postes/fetchposte                   | administration.fetchposte                         | App\Http\Controllers\[email protected]                     | web          |
|        | GET|HEAD | Admin_gestion_postes/gestion_postes               | administration.gestion_postes                     | App\Http\Controllers\[email protected]_postes                 | web          |
|        | GET|HEAD | Admin_gestion_utilisateurs/fetchuser              | administration.fetchuser                          | App\Http\Controllers\[email protected]                      | web          |
|        | GET|HEAD | Admin_gestion_utilisateurs/gestion_utilisateurs   | administration.gestion_utilisateurs               | App\Http\Controllers\[email protected]_utilisateurs           | web          |
|        | GET|HEAD | Admin_gestion_utilisateurs/postuser               | administration.postuser                           | App\Http\Controllers\[email protected]                       | web          |
|        | GET|HEAD | Admin_log_inspection/log_ns                       | administration.log_ns                             | App\Http\Controllers\[email protected]_ns                         | web          |
|        | GET|HEAD | Admin_log_inspection/log_reparation               | administration.log_reparation                     | App\Http\Controllers\[email protected]_reparation                 | web          |
|        | GET|HEAD | Administration/Admin_gestion_postes/removeposte   | administration.gestion_postes.removeposte         | App\Http\Controllers\[email protected]                    | web          |
|        | GET|HEAD | Administration/gestion_postes                     |                                                   | App\Http\Controllers\[email protected]                   | web          |
|        | GET|HEAD | Administration/gestion_utilisateurs               |                                                   | App\Http\Controllers\[email protected]                        | web          |
|        | GET|HEAD | Administration/gestion_utilisateurs/fetchPosteID  | administration.gestion_utilisateurs.fetchPosteID  | App\Http\Controllers\[email protected]                   | web          |
|        | GET|HEAD | Administration/gestion_utilisateurs/fetchPosteNom | administration.gestion_utilisateurs.fetchPosteNom | App\Http\Controllers\[email protected]                  | web          |
|        | GET|HEAD | Administration/gestion_utilisateurs/removeuser    | administration.gestion_utilisateurs.removeuser    | App\Http\Controllers\[email protected]                     | web          |
|        | GET|HEAD | Administration/log_ns                             |                                                   | App\Http\Controllers\[email protected]_log_ns         | web          |
|        | GET|HEAD | Administration/log_reparation                     |                                                   | App\Http\Controllers\[email protected]_log_reparation | web          |
|        | GET|HEAD | Inspection                                        |                                                   | App\Http\Controllers\[email protected]                    | web          |
|        | POST     | Inspection/produit                                |                                                   | App\Http\Controllers\[email protected]_modele                    | web          |
|        | GET|HEAD | Inspection/produit/ns                             | inspection.produit.ns                             | App\Http\Controllers\[email protected]                     | web          |
|        | GET|HEAD | Magasin                                           |                                                   | App\Http\Controllers\[email protected]                     | web          |
|        | GET|HEAD | Produit                                           |                                                   | App\Http\Controllers\[email protected]                       | web          |
|        | GET|HEAD | Reparation                                        |                                                   | App\Http\Controllers\[email protected]                    | web          |
|        | GET|HEAD | Reparation/getPanne                               | Reparation.getPanne                               | App\Http\Controllers\[email protected]                       | web          |
|        | POST     | Reparation/reparer                                | reparation.reparer                                | App\Http\Controllers\[email protected]                        | web          |
|        | GET|HEAD | Role                                              |                                                   | App\Http\Controllers\[email protected]                   | web          |
|        | GET|HEAD | Type_produit                                      |                                                   | App\Http\Controllers\[email protected]                      | web          |
|        | GET|HEAD | Type_produit/fetchModele                          | Type_produit.fetchModele                          | App\Http\Controllers\[email protected]                    | web          |
|        | GET|HEAD | api/user                                          |                                                   | Closure                                                                    | api,auth:api |
|        | GET|HEAD | login                                             |                                                   | App\Http\Controllers\[email protected]                          | web          |
|        | POST     | login/checklogin                                  |                                                   | App\Http\Controllers\[email protected]                     | web          |
|        | GET|HEAD | login/logout                                      |                                                   | App\Http\Controllers\[email protected]                         | web          |
|        | GET|HEAD | magasin/ajtqte                                    | magasin.ajtqte                                    | App\Http\Controllers\[email protected]                         | web          |
|        | GET|HEAD | magasin/getMag                                    | magasin.getMag                                    | App\Http\Controllers\[email protected]                         | web          |
|        | GET|HEAD | produit/fetchdata                                 | produit.fetchdata                                 | App\Http\Controllers\[email protected]                      | web          |
|        | GET|HEAD | produit/getPro                                    | produit.getPro                                    | App\Http\Controllers\[email protected]                         | web          |
|        | GET|HEAD | produit/modifier                                  | produit.modifier                                  | App\Http\Controllers\[email protected]                       | web          |
|        | GET|HEAD | produit/upd                                       | produit.upd                                       | App\Http\Controllers\[email protected]                            | web          |
|        | GET|HEAD | validate/magasin                                  | validate.magasin                                  | App\Http\Controllers\[email protected]                        | web          |
|        | GET|HEAD | validate/produit                                  | validate.produit                                  | App\Http\Controllers\[email protected]                        | web          |
+--------+----------+---------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------+--------------+
Activity icon

Replied to Vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php" Line: 179

It's returning the same error in my first post

Activity icon

Replied to Vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php" Line: 179

I already checked eveything I can't find why !?

Activity icon

Replied to Vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php" Line: 179

@munazzil I updated my post, I puted all the routes of the view that's showing the error.

Activity icon

Replied to Vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php" Line: 179

@tykus yes, this is the route of the page that's showing the error :

Route::get('Administration/gestion_utilisateurs', '[email protected]_administration_gestion_utilisateurs');
Route::get('Admin_gestion_utilisateurs/gestion_utilisateurs', '[email protected]_utilisateurs')->name('administration.gestion_utilisateurs');
Route::get('Admin_gestion_utilisateurs/fetchuser', '[email protected]')->name('administration.fetchuser');
Route::get('Admin_gestion_utilisateurs/postuser', '[email protected]')->name('administration.postuser');
Route::get('/Administration/gestion_utilisateurs', '[email protected]');
Route::get('Administration/gestion_utilisateurs/fetchPosteNom', '[email protected]')->name('administration.gestion_utilisateurs.fetchPosteNom');
Route::get('Administration/gestion_utilisateurs/fetchPosteID', '[email protected]')->name('administration.gestion_utilisateurs.fetchPosteID');
Route::get('Administration/gestion_utilisateurs/removeuser', '[email protected]')->name('administration.gestion_utilisateurs.removeuser');

View :

$('#users_table').DataTable({
                        "processing": true,
                        "serverSide": true,
                        "ajax": "{{ route('administration.gestion_utilisateurs') }}",
                        "columns":[
                            { "data": "id"},
                            { "data": "username"},
                            //{ "data": "password"},
                            { "data": "role" },
                            { "data": "poste_nom"},
                            { "data": "poste_id"},
                            { "data": "modifier"},
                            { "data": "supprimer"}
                        ],
                        'rowCallback': function(row, data, index){
                            $('td', row).eq(4).html('poste ' + data['poste_id']);
                        }
                    });

Url :

http://192.168.100.222:8000/Administration/gestion_utilisateurs
Activity icon

Started a new Conversation Vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php" Line: 179

When I try to load my web page I get this error :

DataTables warning: table id=users_table - Ajax error. For more information about this error, please see http://datatables.net/tn/7

When I go to the network tab it's showing this error :

{message: "", exception: "Symfony\Component\HttpKernel\Exception\NotFoundHttpException",…}
exception: "Symfony\Component\HttpKernel\Exception\NotFoundHttpException"
file: "/var/www/html/Raylan-gestion-magasin/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php"
line: 179
message: ""
trace: [{,…}, {,…}, {,…}, {,…}, {,…},…]
Sep
19
1 month ago
Activity icon

Started a new Conversation Laravel SQLSTATE[42000]: Syntax Error Or Access Violation: 1066 Not Unique Table/alias: 'log_ns' (SQL: Select `log_ns`.`id`,...

I am trying to load data from mysql database but I keep getting this error, here is my code :

public function log_ns(Request $request) {
        $data = DB::table('log_ns')
        ->join('log_ns', 'log_ns.id', '=', 'log_ns.id_produit')
        ->join('users', 'users.poste_id', '=', 'log_ns.poste')
        ->join('pannes', 'pannes.panne_id', '=', 'log_ns.panne')
        ->select('log_ns.id', 'log_ns.modele', 'log_ns.n_s', 'log_ns.couleur', 'log_ns.etat_panne', 'pannes.panne_nom', 'log_ns.remarque', 'log_ns.poste', 'users.username', 'log_ns.created_at')
        ->get();
      return  DataTables::of($data)
      ->make(true);
    }
Activity icon

Started a new Conversation Laravel DataTables Not Working

After updating my composer and running the following commands my dataTables stopped working :

php artisan config:cache
php artisan config:clear
php artisan cache:clear

I reinstalled DataTable from scratch and even deleted the vendor folder but the DataTables still not working.

Activity icon

Replied to Laravel SQLSTATE[HY000] [1698] Access Denied For User 'root'@'localhost' (1698)

I solved this by running the folowing commands :

php artisan config:cache
php artisan config:clear
php artisan cache:clear
Activity icon

Started a new Conversation Laravel SQLSTATE[HY000] [1698] Access Denied For User 'root'@'localhost' (1698)

When loging in to laravel app I keep getting this error :

"SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' (SQL: select * from `users` where `username` = Admin limit 1)"

I am no trying to login with root but it keeps showing this error, here is my .env :

APP_NAME=gestion_magasin
APP_ENV=local
APP_KEY=base64:6o5/esvKCiBvWTN1q2nWqvNMa0m6zJe8lEwheglLctM=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=gestion_magasin
DB_USERNAME=user
DB_PASSWORD=password

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
Aug
28
2 months ago
Activity icon

Replied to Laravel Custom Data In Datatables

Thank you for your reply can you please tell me how to controll the displayed columns like :

"columns":[
                            { "data": "id"},
                            { "data": "poste_nom"},
                            { "data": "poste_id"},
                            { "data": "modifier"},
                            { "data": "supprimer"}
                        ]
Aug
27
2 months ago
Activity icon

Started a new Conversation Laravel Custom Data In Datatables

Hello, I need to make a custom column in laravel datatable by adding the word 'poste' to the column 'poste_id' so the column will display 'poste 2' instead of '2' in each row, here is my code :

$('#poste_table').DataTable({
                        "processing": true,
                        "serverSide": true,
                        "ajax": "{{ route('administration.gestion_postes') }}",
                        "columns":[
                            { "data": "id"},
                            { "data": "poste_nom"},
                            { "data": "poste_id"},
                            { "data": "modifier"},
                            { "data": "supprimer"}
                        ]
                    });
Aug
04
3 months ago
Activity icon

Replied to Laravel Keyup Function Not Working

Really sorry I missed the id, I added attribute id to the text field.

Activity icon

Started a new Conversation Laravel Keyup Function Not Working

I need to get some values from the database after entering a value in a text field, but nothing happens. Here is my code:

<div class="form-group">
    <label>Entrez le numéro de série</label>
    <input type="text" name="n_serie" required="required" class="form-control" />
</div>
<div class="form-group">
    <label>Panne signalée</label>
    <span id="panne"></span>
</div>

$('#n_serie').keyup(function(){
            event.preventDefault();
            var form_data = $(this).serialize();
            $.ajax({
                url:"{{ route('Reparation.getPanne') }}",
                method:"GET",
                data:form_data,
                dataType:"json",
                success:function(data)
                {
                    $('#panne').html(data.success);
                }
            });
        });
Jul
24
3 months ago
Activity icon

Replied to How To Add A Required Attribute To A Drop-down Menu With Jquery ?

Thank you for your reply when I use <select> I don't get the same result when I use <li><a href="#">???</a></li>, can you please show me the code of the drop-down menu part ?

Activity icon

Started a new Conversation How To Add A Required Attribute To A Drop-down Menu With Jquery ?

I need to set a drop-down menu required when an option has been selected in a radio button to submit it in a form, here is my code :

View :

<form method="POST" id="form_inspection">
            <input type="hidden" name="_token" value="{{ csrf_token() }}">
            <span id="form_output"></span>            
            <div class="form-group">
                <label>Etat panne</label>
                <br />
                <label class="radio-inline">
                  <input type="radio" name="et_pn" value="n_panne">Pas de panne
                </label>
                <label class="radio-inline">
                  <input type="radio" name="et_pn" value="panne">Panne
                </label>
            </div>
            <div class="form-group">
                <div class="dropdown">
                    <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown"
                        id="dropdown-toggle">Choisissez la panne
                        <span class="caret"></span></button>
                    <ul class="dropdown-menu">
                        <li class="dropdown-header">Phone</li>
                        <li><a href="#">???</a></li>
                        <li class="divider"></li>
                        <li class="dropdown-header">TV</li>
                        <li><a href="#">???</a></li>
                    </ul>
                </div>
            </div>                     
        </form>

    <script>
    $('#form_inspection input').on('change', function() {
          
            if($('input[name=et_pn]:checked', '#form_inspection').val() == 'panne') {
                $("#dropdown-toggle").attr("disabled",false);
                
        //$(".dropdown-menu li a").prop('required',true);

            }
            else {
                $("#dropdown-toggle").attr("disabled",true);                
            }
        });
     </script>
Jul
22
3 months ago
Activity icon

Replied to The GET Method Is Not Supported For This Route. Supported Methods: POST.

I managed to solve this by replacing this :

$modele = $request->modele;
            $produit = Produit::find($modele);
            dump($produit->id);
            die();
            if (empty($produit)) {
                exit(json_encode(['message' => "pas trouvé"]));
            }

            $id_produit = $produit->id;

By this :

$produit = DB::table('produits')->where('modele', $request->modele)->first();

And changing both the route method and the ajax method to from POST to GET.

Activity icon

Replied to The GET Method Is Not Supported For This Route. Supported Methods: POST.

Sorry, if I was not clear, I thought this might help to resolve the problem, these errors are the browser console display :

GET:

(Method Not Allowed)

POST:

produit:92 Uncaught TypeError: Cannot read property 'length' of undefined at Object.success (produit:92)

And if I open those in a new tab I get this error which is laravel error display :

"The GET method is not supported for this route. Supported methods: POST."
Activity icon

Replied to The GET Method Is Not Supported For This Route. Supported Methods: POST.

Thank you for your reply, but nothing has been resolved. If you read my whole post, you will see that the get method or the post method did not work and both give me the same error which is the title of the post. I mean the PHP controller processing give the same error for get and post.

Activity icon

Replied to The GET Method Is Not Supported For This Route. Supported Methods: POST.

With the get method I get this error :

POST http://127.0.0.1:8000/Inspection/produit/ns 405 (Method Not Allowed)

With the post method I get this error :

produit:92 Uncaught TypeError: Cannot read property 'length' of undefined
    at Object.success (produit:92)
    at i (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at z (jquery.min.js:4)
    at XMLHttpRequest.<anonymous> (jquery.min.js:4)
Activity icon

Replied to The GET Method Is Not Supported For This Route. Supported Methods: POST.

$ php artisan route:list
+--------+----------+-----------------------+-----------------------+----------------------------------------------------------+--------------+
| Domain | Method   | URI                   | Name
         | Action
         | Middleware   |
+--------+----------+-----------------------+-----------------------+----------------------------------------------------------+--------------+
|        | GET|HEAD | /                     |
         | Closure
         | web          |
|        | GET|HEAD | Inspection            |
         | App\Http\Controllers\[email protected]  | web          |
|        | POST     | Inspection/produit    |
         | App\Http\Controllers\[email protected]_modele  | web          |
|        | POST     | Inspection/produit/ns | inspection.produit.ns | App\Http\Controllers\[email protected]   | web          |
|        | GET|HEAD | Magasin               |
         | App\Http\Controllers\[email protected] | web          |
|        | GET|HEAD | Produit               |
         | App\Http\Controllers\[email protected]     | web          |
|        | GET|HEAD | Type_produit          |
         | App\Http\Controllers\[email protected]    | web          |
|        | GET|HEAD | Type_produit/fetch    | Type_produit.fetch    | App\Http\Controllers\[email protected]        | web          |
|        | GET|HEAD | api/user              |
         | Closure
         | api,auth:api |
|        | GET|HEAD | login                 |
         | App\Http\Controllers\[email protected]        | web          |
|        | POST     | login/checklogin      |
         | App\Http\Controllers\[email protected]   | web          |
|        | GET|HEAD | login/logout          |
         | App\Http\Controllers\[email protected]       | web          |
|        | GET|HEAD | magasin/ajtqte        | magasin.ajtqte        | App\Http\Controllers\[email protected]       | web          |
|        | GET|HEAD | magasin/getMag        | magasin.getMag        | App\Http\Controllers\[email protected]       | web          |
|        | GET|HEAD | produit/fetchdata     | produit.fetchdata     | App\Http\Controllers\[email protected]    | web          |
|        | GET|HEAD | produit/getPro        | produit.getPro        | App\Http\Controllers\[email protected]       | web          |
|        | GET|HEAD | produit/modifier      | produit.modifier      | App\Http\Controllers\[email protected]     | web          |
|        | GET|HEAD | produit/upd           | produit.upd
         | App\Http\Controllers\[email protected]
         | web          |
|        | GET|HEAD | validate/magasin      | validate.magasin      | App\Http\Controllers\[email protected]      | web          |
|        | GET|HEAD | validate/produit      | validate.produit      | App\Http\Controllers\[email protected]      | web          |
+--------+----------+-----------------------+-----------------------+----------------------------------------------------------+--------------+
Activity icon

Started a new Conversation The GET Method Is Not Supported For This Route. Supported Methods: POST.

I am developing an application where I have to submit a form, with some values of this form, get the corresponding values from other MySQL tables and submit it to a table, the problem is that I keep having this error. Here is my code:

View:

$('#form_inspection').on('submit', function(event){
        event.preventDefault();
        var form_data = $(this).serialize();
        $.ajax({
            url:"{{ route('inspection.produit.ns') }}",
            method:"post",
            data:form_data,
            dataType:"json",
            success:function(data)
            {
                if(data.error.length > 0)
                {
                    var error_html = '';
                    for(var count = 0; count < data.error.length; count++)
                    {
                        error_html += '<div class="alert alert-danger">'+data.error[count]+'</div>';
                    }
                    $('#form_output').html(error_html);
                }
                else
                {
                    $('#form_output').html(data.success);
                    $('#form_inspection')[0].reset();
                }
            }
        })
    });

Controller :

function inspection(Request $request) {
        $validation = Validator::make($request->all(), [
            'modele'     =>  'min:0',
            'couleur'    =>  'min:0',
            'n_serie'    =>  'min:0',
            //'etat_panne' =>  'min:0',
            //'poste'      =>  'min:0',
        ]);

        $error_array = array();
        $success_output = '';
        if ($validation->fails())
        {
            foreach($validation->messages()->getMessages() as $field_name => $messages)
            {
                $error_array[] = $messages;
            }
        }
        else
        {
            $modele = $request->modele;
            $produit = Produit::find($modele);
            if (empty($produit)) {
                exit(json_encode(['message' => "pas trouvé"]));
            }
           
            $id_produit = $produit->id;
            $ns = new Log_ns([
                'id_produit'    =>  $id_produit,
                'n_s'           =>  $request->get('n_s'),
                'couleur'       =>  $request->get('color'),
                'etat_panne'    =>  $request->get('etat_panne'),
                'panne'         =>  $request->get('panne'),
                'remarque'      =>  $request->get('remarque'),
                'poste'         =>  ('1'),
            ]);
            $ns->save();
            $success_output = '<div class="alert alert-success">Produit ajouté</div>';
        }
        $output = array(
            'error'     =>  $error_array,
            'success'   =>  $success_output
        );
        echo json_encode($output);
    }

Route :

Route::post('Inspection/produit/ns', '[email protected]')->name('inspection.produit.ns');

Jul
16
3 months ago
Activity icon

Replied to How To Populate A Drop Dropdown Menu From Another Drowdown Menu ?

Thank you for your replys, I managed to make a dynamic drop down menu on my own ;)

here is my code :

View :

<form method="POST" id="type_produit">
            <br />
            <div class="container box">
                <br />
                <div class="form-group">
                    <select name="produit" id="produit" class="form-control input-lg dynamic" data-dependent="modele">
                        <option value="">Sélectionner le Produit</option>
                        @foreach($produit_list as $produit)
                        <option value="{{ $produit->produit}}">{{ $produit->produit }}</option>
                        @endforeach
                    </select>
                </div>
                <br />
                <div class="form-group">
                    <select name="modele" id="modele" class="form-control input-lg dynamic" data-dependent="id">
                        <option value="">Sélectionner le modele</option>
                    </select>
                </div>
                <br />
                <div class="form-group">
                    <select name="couleur" id="couleur" class="form-control input-lg">
                        <option value="">Sélectionner la couleur</option>
                    </select>
                </div>
                <input type="hidden" name="_token" value="{{ csrf_token() }}">
                <br />
            </div>
        </form>


$(document).ready(function() {

            $('.dynamic').change(function(){
                if($(this).val() != '')
                {
                var select = $(this).attr("id");
                var value = $(this).val();
                var dependent = $(this).data('dependent');
                var _token = $('input[name="_token"]').val();
                $.ajax({
                    url:"{{ route('Type_produit.fetch') }}",
                    method:"GET",
                    data:{select:select, value:value, _token:_token, dependent:dependent},
                    success:function(result)
                    {
                    $('#'+dependent).html(result);
                    }
                })
                }
            });

            $('#produit').change(function(){
            $('#modele').val('');
            $('#couleur').val('');
            });

        });

Controller:

function getModele(Request $request)
    {
        $produit_list = DB::table('produits')
            ->groupBy('id')
            ->get();
        return view('Type_produit')->with('produit_list', $produit_list);
    }

    function fetch(Request $request)
       {
        $select = $request->get('select');
        $value = $request->get('value');
        $dependent = $request->get('dependent');
        $data = DB::table('produits')
          ->where($select, $value)
          //->groupBy($dependent)
          ->get();
        $output = '<option value="">Select '.ucfirst($dependent).'</option>';
        foreach($data as $row)
        {
         $output .= '<option value="'.$row->$dependent.'">'.$row->$dependent.'</option>';
        }
        echo $output;
    }

Root :

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

Route::get('Type_produit/fetch', '[email protected]')->name('Type_produit.fetch');`
Activity icon

Replied to How To Populate A Drop Dropdown Menu From Another Drowdown Menu ?

Thank you for your reply, when I try to run this code nothing happens and the md drop down menu is still empty :

$("#md_menu li a").click(function(){
            $.ajax({
                    type: "GET",
                    dataType: "json",
                    url: "{{ url('Type_produit/getproduit')}}",
                    data: $('#type_produit_form').serialize(),
                    success: function (data) {
                        if (data.error === 0) {
                            $.each(data.prDropDown, function (key, value) {
                                $('#md_dropdown-toggle').append("<option value='" + key + "' selected ='selected'>" + value + "</option>");
                            });
                        } else {
                            swal('Whoops', data.message, 'warning');
                        }
                    },
            });
        });
Jul
14
4 months ago
Activity icon

Started a new Conversation How To Populate A Drop Dropdown Menu From Another Drowdown Menu ?

I am developing an application where I need to populate a dropdown menu with values related to the value selected in the previous dropdown menu all the values are from MySQL database, how populate the second dropdown menu ?

Here is my code:

View:

<form method="POST" id="">
            <input type="hidden" name="_token" value="{{ csrf_token() }}">
            <div class="form-group">
                <div class="dropdown">
                    <button class="btn btn-default dropdown-toggle" type="button"
                        data-toggle="dropdown" id="pr_dropdown-toggle">Choisissez le type du produit
                    <span class="caret"></span></button>
                    <ul class="dropdown-menu" id="pr_menu">
                        @if (isset($prDropDown))
                            @foreach($prDropDown as $id => $produit)
                                <li><a href="#" >{{$produit}}</a></li>
                            @endforeach
                        @endif
                    </ul>
                </div>
            </div>
            <div class="form-group">
                <div class="dropdown">
                    <button class="btn btn-default dropdown-toggle" type="button"
                        data-toggle="dropdown" id="md_dropdown-toggle">Choisissez le modèle
                        <span class="caret"></span></button>
                    <ul class="dropdown-menu" id="md_menu">

                    </ul>
                </div>
            </div>           
        </form>
    </div>
    <br />

    <script type="text/javascript">
    $(document).ready(function() {
        $("#pr_menu li a").click(function(){
            $('.selectedLi').removeClass('selectedLi');
            $(this).addClass('selectedLi');
            var selText = $(this).text();
            $("#pr_dropdown-toggle").html(selText+
            ' <span class="caret"></span>');
            $("#produit").val(selText);
        });

        $("#md_menu li a").click(function(){
            $('.selectedLi').removeClass('selectedLi');
            $(this).addClass('selectedLi');
            var selText = $(this).text();
            $("md_#dropdown-toggle").html(selText+
            ' <span class="caret"></span>');
            $("#produit").val(selText);
        });

Controller:

public function getElectronics() {
        $prDropDown = Produit::groupBy('produit')->pluck('produit');
        return view('Type_produit', compact('prDropDown'));
    }

Route:

Route::get('Type_produit/getproduit', '[email protected]');
Jul
03
4 months ago
Activity icon

Replied to How To Populate A Dropdown Menu From Database ?

I managed to fill the drop-down menu with the data from the MySQL database.

Here is my code :

View :

<div class="form-group">
                <div class="dropdown">
                    <button class="btn btn-default dropdown-toggle" type="button"
                        data-toggle="dropdown" id="dropdown-toggle">Choisissez le type du produit
                        <span class="caret"></span></button>
                    <ul class="dropdown-menu">
                            @if (isset($prDropDown))
                            @foreach($prDropDown as $id => $produit)
                        <li><a href="{{$id }}" >{{$produit}}</a></li>
                        @endforeach
                        @endif
                    </ul>
                </div>
            </div>

Controller :

public function getProducts() {
        $prDropDown = Produit::pluck('produit', 'id');
        return view('Type_produit', compact('prDropDown'));
    }
Jul
02
4 months ago
Activity icon

Replied to How To Populate A Dropdown Menu From Database ?

@TYKUS - Please be yourself and keep doing what you do because it's very useful and it allows me to learn.

Activity icon

Replied to How To Populate A Dropdown Menu From Database ?

@TYKUS - Yes, I need to store the submitted data in MySQL table

Activity icon

Replied to How To Populate A Dropdown Menu From Database ?

@TYKUS - Yes, I do.

<script type="text/javascript">

</script>
Activity icon

Replied to How To Populate A Dropdown Menu From Database ?

@TYKUS - Thank you for your reply, can you please provide me with the working solution code ?

Activity icon

Replied to How To Send Value From Dropdown To The Controller Via Ajax ?

@MVD - Thank you for your reply i managed to do this by adding a hidden field and submitting this field with the selected value from the dropdown menu.

Activity icon

Started a new Conversation How To Populate A Dropdown Menu From Database ?

I need to populate a drop-down menu with MySQL database values and trigger it when you select a value, it populates a second drop-down menu with values related to the value selected in the first drop-down menu. Here is my drop-down menu:

<div class="form-group">
                <div class="dropdown">
                    <button class="btn btn-default dropdown-toggle" type="button"
                        data-toggle="dropdown" id="dropdown-toggle">Choisissez le modèle
                        <span class="caret"></span></button>
                    <ul class="dropdown-menu">
                        <li class="dropdown-header">Phone</li>
                        <li><a href="#">Smartphone</a></li>
                        <li><a href="#">Featurephone</a></li>
                        <li class="divider"></li>
                        <li class="dropdown-header">TV</li>
                        <li><a href="#">SmartTV</a></li>
                        <li><a href="#">BasicTV</a></li>
                        <li><a href="#">Demodulateur</a></li>
                    </ul>
                </div>
            </div>
        </div>
Jun
13
5 months ago
Activity icon

Replied to How To Send Value From Dropdown To The Controller Via Ajax ?

@MVD - Can you pls show me how to get the selected value in the controller like below :

$pr = new Produit([
                    'produit'              =>  $request->get('produit'),
                    'modele'               =>  $request->get('modele'),
                    ...
                ]);
 $pr->save();
Jun
12
5 months ago
Activity icon

Replied to How To Send Value From Dropdown To The Controller Via Ajax ?

@MVD - Thank you for your reply, what I meant is how to submit the selected value from the following dropdown menu :

<div class="form-group">
    <div class="dropdown">
        <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Choisissez le type du prduit<span class="caret"></span></button>
            <ul class="dropdown-menu">
                <li class="dropdown-header">Phone</li>
                <li><a href="#">Smartphone</a></li>
                <li><a href="#">Featurephone</a></li>
                <li class="divider"></li>
                <li class="dropdown-header">TV</li>
                <li><a href="#">SmartTV</a></li>
                <li><a href="#">BasicTV</a></li>
                <li><a href="#">Demodulateur</a></li>
            </ul>
    </div>
</div>

I often have the values of the form fields by assigning a name to each entry but in this case I have 5 entries in a single entry.

Activity icon

Started a new Conversation How To Send Value From Dropdown To The Controller Via Ajax ?

Hello, how to get selected value from this dropdown like an : <input type="text" required="required" name="produit" class="form-control" /> when submiting the form ?

Here is my code :

<div class="form-group">
    <div class="dropdown">
        <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Choisissez le type du prduit<span class="caret"></span></button>
            <ul class="dropdown-menu">
                <li class="dropdown-header">Phone</li>
                <li><a href="#">Smartphone</a></li>
                <li><a href="#">Featurephone</a></li>
                <li class="divider"></li>
                <li class="dropdown-header">TV</li>
                <li><a href="#">SmartTV</a></li>
                <li><a href="#">BasicTV</a></li>
                <li><a href="#">Demodulateur</a></li>
            </ul>
    </div>
</div>







$('#pr_form').on('submit', function(event){
        event.preventDefault();
        var form_data = $(this).serialize();
        $.ajax({
            url:"{{ route('produit.upd') }}",
            method:"GET",
            data:form_data,
            dataType:"json",
            success:function(data)
            {
                if(data.error.length > 0)
                {
                    var error_html = '';
                    for(var count = 0; count < data.error.length; count++)
                    {
                        error_html += '<div class="alert alert-danger">'+data.error[count]+'</div>';
                    }
                    $('#form_output').html(error_html);
                }
                else
                {
                    $('#form_output').html(data.success);
                    $('#pr_form')[0].reset();
                    $('#pr_table').DataTable().ajax.reload();
                }
            }
        })
    });
Jun
11
5 months ago
Activity icon

Started a new Conversation Problem Whith Multiple Triggers In The Same Function

I am developing an application in which I need to update some MySQL database values using laravel datatables. The problem is that when I perform my function, it does not refresh the table so i have to do it manually!! Here is my code :

$('#qte_form').on('submit', function(event){
        var newqte = parseInt($("#qte_ajt").val()) + parseInt($("#prev_qte").val());
        $("#new_qte").val(newqte);
        console.log($("#new_qte").val());
        event.preventDefault();
        var form_data = $(this).serialize();
        if(confirm("Êtes-vous sûr de cette quantité?"))
        {
            $.ajax({
                url:"{{route('magasin.ajtqte')}}",
                method:"get",
                data:form_data,
                dataType:"json",
                success:function(data)
                {
                    if(data.error.length > 0)
                    {
                        var error_html = '';
                        for(var count = 0; count < data.error.length; count++)
                        {
                            error_html += '<div class="alert alert-danger">'+data.error[count]+'</div>';
                        }
                        $('#form_output').html(error_html);
                    }
                    else//refresh
                    {
                        alert(data);
                        $('#form_output').html(data.success);
                        $('#qte_form')[0].reset();
                        $('#p_table').DataTable().ajax.reload();
                    }
                }
            })
        }
        else
        {
            return false;
        }
    });
Jun
09
5 months ago
Activity icon

Started a new Conversation How To Get A Value In Js From Laravel Datatable Cell ?

I am developing an application where i need to get a value from a datatable cell by a button click then update this value in js

Activity icon

Replied to Too Few Arguments To Function

Thank you for your reply, i found a better way to do this.

May
28
5 months ago
Activity icon

Replied to Too Few Arguments To Function

@SNAPEY - Thank you for your reply, now i am getting this error:

"Action App\Http\Controllers\[email protected] not defined. (View: C:\Users\...\resources\views\edit.blade.php)"

I am trying to access to the function update throught the edit view, how do I define it in web.php file ?