Flex

Experience

1,970

0 Best Reply Awards

  • Member Since 8 Months Ago
  • 0 Lessons Completed
  • 0 Favorites

20th August, 2017

Flex left a reply on SQLSTATE[23000]: Integrity Constraint Violation: • 8 hours ago

@Snapey finally got the result. in this way in My TaskController

  public function postNewTask(Request $request,$id, Project $project)
{

    $task = new Task;
    $task->task_name   = $request->input('name');
    $task->body = $request->input('body');
    $task->assign = $request->input('status');
    $task->priority = $request->input('status');
    $task->duedate  = date("Y-m-d", strtotime($request->input("date")));
    $task->project_id = $id;
    $task->save();

form url

<form  method="post" action="{{ route('projects.tasks.create', $project->id) }}">

and routes

Route::post('projects/{projects}/tasks', [
    'uses' => '\App\Http\Controllers\[email protected]',
    'as' => 'projects.tasks.create'
]);

thanks very much for your instructions....

19th August, 2017

Flex left a reply on SQLSTATE[23000]: Integrity Constraint Violation: • 1 day ago

@Snapey I found some error in My Migration files that means I did not put primary and forign key as well between My project and Task files is this problem with this mattes

Task migration file

public function up()
    {
         Schema::create('tasks', function(Blueprint $table)
        {
            $table->increments('id')->unsigned();
            $table->longText('task_name');
            $table->text('body');
            $table->string('assign');
            $table->string('priority');
            $table->date('duedate');
            $table->integer('project_id')->unsigned();
            $table->timestamps();
 
          
        });
        
    }

projects migration file

public function up()
    {
        Schema::create('projects', function(Blueprint $table)
            {
                $table->increments('id')->unsigned();
                $table->string('project_name');
                $table->longText('project_notes');
                $table->string('project_status')->default('Upcoming');
                $table->integer('user_id')->unsigned();
                $table->char('color', 7);
                $table->string('group');
                $table->timestamps();

                $table->foreign('user_id')
                      ->references('id')->on('users')
                      ->onUpdate('cascade')
                      ->onDelete('cascade');
            });
        //
    }

Flex left a reply on SQLSTATE[23000]: Integrity Constraint Violation: • 1 day ago

@Snapey ok got lop of things from you now I need know some thing this is My new routes

Route::resource('project/{project}/tasks','TasksController');


and this is my new form URL

<form method="post" action="{{ route('tasks.store', $project->id) }}">

what are the wrongs with this both routes and form actions

Flex left a reply on SQLSTATE[23000]: Integrity Constraint Violation: • 1 day ago

@Snapey did it with your routes but same error has occurred here

Flex left a reply on SQLSTATE[23000]: Integrity Constraint Violation: • 1 day ago

@Snapey above code segment occurred same error

My task roures is as follow

Route::resource('tasks','TasksController');

Flex left a reply on SQLSTATE[23000]: Integrity Constraint Violation: • 1 day ago

No any idea?

Flex started a new conversation SQLSTATE[23000]: Integrity Constraint Violation: • 1 day ago

Hi, I need pass Project Model id as project_id to My Task Model table. this is My TaskController

public function store(Request $request, Project $project)
{
    $task = new Task;
    $task->task_name   = $request->input('name');
    $task->body = $request->input('body');
    $task->assign = $request->input('status');
    $task->priority = $request->input('status');
     $task->duedate  = date("Y-m-d", strtotime($request->input("date")));
    

    // This will set the project_id on task and save it
    $project->tasks()->save($task);
}

this is My form action route regarding to store task data in projects folder blade file is show.blade.php

<form method="post" action="{{ route('tasks.store') }}">

this is Task Mode

<?php

namespace App;

use App\User;
use App\Auth;
use App\Project;

use Illuminate\Database\Eloquent\Model;

class Task extends Model
{
     protected $fillable = ['task_name', 'body', 'assign','priority','duedate','project_id'];



      public function scopeProject($query, $id)
    {
        return $query->where('project_id', $id);
    }


     public function projects()
     {
         return $this->belongsTo('App\Project');
     }
    
    
    //
}

this is Project Model

<?php

namespace App;
use Auth;
use App\Task;

use Illuminate\Database\Eloquent\Model;

class Project extends Model
{
    protected $fillable = ['project_name','project_notes','project_status','color','group'];
    //

    public function tasks(){
         return $this->hasMany('App\Task');
}


}


but I got this error massage here

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'project_id' cannot be null

how can fix this problem?

13th August, 2017

Flex left a reply on How To Fix Argument 3 Passed To App\Http\Controllers\TasksController::store() Must Be An Instance Of App\Task, None Given • 6 days ago

@tykus is generated follwing error message

ErrorException in TasksController.php line 59:
 Undefined variable: project

Flex left a reply on Route::resource Problem • 1 week ago

hey...No any idea???

Flex started a new conversation Route::resource Problem • 1 week ago

hi, I have some problem with Route::resource That means consider following My Route

Route::resource('tasks','TasksController');

Now, I have following store method in My TaskController

  public function store(Request $request, $id, Task $task)
    {
       

        $task = new Task;
        $task->task_name   = $request->input('name');
        $task->body = $request->input('body');
        $task->assign          = $request->input('status');
        $task->priority        = $request->input('status');
        $task->duedate  = date("Y-m-d", strtotime($request->input("date")));// $request->input('date');
        $task->project_id        = $id;

       

        $task->save();


    }

My problem is can I use Route::resource('tasks','TasksController'); for store method????

Flex left a reply on How To Fix Argument 3 Passed To App\Http\Controllers\TasksController::store() Must Be An Instance Of App\Task, None Given • 1 week ago

@tykus I need scope project_id using Project model and do not need use input to project_id then how can do this?

12th August, 2017

Flex left a reply on How To Fix Argument 3 Passed To App\Http\Controllers\TasksController::store() Must Be An Instance Of App\Task, None Given • 1 week ago

can you any body explain what is the meaning of My error code?

Flex left a reply on How To Fix Argument 3 Passed To App\Http\Controllers\TasksController::store() Must Be An Instance Of App\Task, None Given • 1 week ago

@tykus did you mean may I need remove store method here? and replace another method name?

Flex left a reply on How To Fix Argument 3 Passed To App\Http\Controllers\TasksController::store() Must Be An Instance Of App\Task, None Given • 1 week ago

@jusep My route is as follwing

Route::resource('tasks','TasksController');

Flex left a reply on How To Fix Argument 3 Passed To App\Http\Controllers\TasksController::store() Must Be An Instance Of App\Task, None Given • 1 week ago

@jusep now occured

ErrorException in TasksController.php line 45: Missing argument 2 for App\Http\Controllers\TasksController::store()

Flex started a new conversation How To Fix Argument 3 Passed To App\Http\Controllers\TasksController::store() Must Be An Instance Of App\Task, None Given • 1 week ago

hello, I am going to scope Project model in My Task Model as following

  public function scopeProject($query, $id)
    {
        return $query->where('project_id', $id);
    }

now I have follwing functipn in TaskController

public function store(Request $request, $id, Task $task)// this is line 45
    {
       

        $task = new Task;
        $task->task_name   = $request->input('name');
        $task->body = $request->input('body');
        $task->assign          = $request->input('status');
        $task->priority        = $request->input('status');
        $task->duedate  = date("Y-m-d", strtotime($request->input("date")));// $request->input('date');
        $task->project_id        = $id;

       

        $task->save();


    }

I need save project_id in Task model according to the project tasks. but now i got this error

ErrorException in TasksController.php line 45:
 Argument 3 passed to App\Http\Controllers\TasksController::store() must be an instance of App\Task, none given

what is this error how can I fix this problem?

6th August, 2017

Flex left a reply on How To Update Model Files With Relationship • 2 weeks ago

@shujau I have Task model I need to know is it ok paste relationship codes in model and save it? to establish relationship

Flex started a new conversation How To Update Model Files With Relationship • 2 weeks ago

hi, I have following project model

<?php

namespace App;
use Auth;

use Illuminate\Database\Eloquent\Model;

class Project extends Model
{
    protected $fillable = ['project_name','project_notes','project_status','color','group'];
    //
}

now I need add relationship to project model as

<?php

namespace App;
use Auth;

use Illuminate\Database\Eloquent\Model;

class Project extends Model
{
    protected $fillable = ['project_name','project_notes','project_status','color','group'];
    //
}

public function tasks(){
         return $this->hasMany('App\Task');
}

then My problem is this after add relationship codes to project model may I need create new model file or is it ok just relationship codes puts ans save?

5th August, 2017

Flex left a reply on How To Setup Laravel Relationship Between Two Models • 2 weeks ago

May I create new models with relationship or can I update with relationship codes in My models?

Flex started a new conversation How To Setup Laravel Relationship Between Two Models • 2 weeks ago

hello, need set up relationship with My two models. case is this I have two models as Project and Task. one project have many task/s and one task has only one project. following are My models.

Project.php

<?php

namespace App;
use Auth;

use Illuminate\Database\Eloquent\Model;

class Project extends Model
{
    protected $fillable = ['project_name','project_notes','project_status','color','group'];
    //
}

Task.php

<?php

namespace App;

use App\User;
use App\Auth;
//use App\Project;
use Illuminate\Database\Eloquent\Model;

class Task extends Model
{
     protected $fillable = ['task_name', 'body', 'assign','priority','duedate'];
    
    
    //
}

I have this question

  1. what type of relationship do I need (1 to 1 , 1 to many)

2.how can I configure above models with suitable relationship.

3rd August, 2017

Flex left a reply on Unable To Print Table Data In Laravel • 2 weeks ago

@36864 actually currently working this function well

 $projects = Project::all();
        return view('projects.index')->withProjects($projects);

My problem is can I execute both index function in one like this

public function index()
     {
        $projects = Project::all();
        return view('projects.index')->withProjects($projects);

        $tasks = Task::all();
        return view('projects.show')->with('tasks', $tasks);

     }

or may I code it seperetly like this

public function index()
     {
        $projects = Project::all();
        return view('projects.index')->withProjects($projects);
}

and

public function index()
     {
        $tasks = Task::all();
        return view('projects.show')->with('tasks', $tasks);

     }

what is the correct way?

Flex left a reply on Unable To Print Table Data In Laravel • 2 weeks ago

@36864 is this way correct

public function index()
     {
        $projects = Project::all();
        return view('projects.index')->withProjects($projects);

        $tasks = Task::all();
        return view('projects.show')->with('tasks', $tasks);

     }

Flex left a reply on Unable To Print Table Data In Laravel • 2 weeks ago

@Snapey can I use Task model in ProjectController?

2nd August, 2017

Flex left a reply on Unable To Print Table Data In Laravel • 2 weeks ago

@Snapey In My case problem is this I have two controller as ProjectController and TaskController. I need view my data via show.blade.php file witch it is in projects folder. in this case I need grab task_name to index.blade.php view witch situated in tasks folder using TaskController. then how can do this?

Flex left a reply on Unable To Print Table Data In Laravel • 2 weeks ago

@DanielBanciulea actually My show.blade.php file is in project folder not in task folder.

1st August, 2017

Flex started a new conversation Unable To Print Table Data In Laravel • 2 weeks ago

need print column data in my laravel app. My controller is TaskController.php

public function index()
{
    $tasks = Task::all();
    return view('tasks.index')->with('tasks', $tasks);
    }

index.blade.php file is

@if(isset($tasks)) 
@foreach ($tasks as $task)
<h1>{{ $task->task_name }}</h1>
@endforeach
@endif

I am going include this index view file in show.blade.php file as following

@include('tasks.index')

but unable to print table data no any errors occurred. how can I print task_name in show view file?

15th July, 2017

Flex left a reply on Unable To Display Table Data • 1 month ago

@coderathore No it is not working. I think we should follow Snapey way

Flex left a reply on Unable To Display Table Data • 1 month ago

@Snapey OK, later I need show My tasks according to the projects. Then may I use show() here?

Flex left a reply on Unable To Display Table Data • 1 month ago

@coderathore did your way but same thing not results yet

Flex left a reply on Unable To Display Table Data • 1 month ago

@dany68 No, I have several tasks to print but your solutions not success for me

Flex started a new conversation Unable To Display Table Data • 1 month ago

need display task table column value "task_name" in show.blade.file @ tasks folder this is TaskController

public function store(Request $request)//, $id, Task $task)
    {
       

        $task = new Task;
        $task->task_name   = $request->input('name');
        $task->body = $request->input('body');
        $task->assign          = $request->input('status');
        $task->priority        = $request->input('status');
        $task->duedate  = date("Y-m-d", strtotime($request->input("date")));// $request->input('date');
      //  $task->project_id        = $id;

       

        $task->save();


    }

    public function show($id)
    {
        $task = Task::find($id);
        
        return view('tasks.show')->withTasks($task);

    }

show.blade.php






@if(isset($tasks))
 @foreach($tasks as $ta)

<h1>{{ $ta->task_name }}</h1>

@endforeach

@endif


routes.php

Route::resource('tasks','TasksController');

No, any error but not display task_name in the task table

11th July, 2017

Flex left a reply on Not Save Bootstrap Date Value To Tha DB Table • 1 month ago

is this jquery problem?

Flex started a new conversation Not Save Bootstrap Date Value To Tha DB Table • 1 month ago

using bootstrap date picker in My form to save date value in the controller

 public function store(Request $request)
    {
       

        $task = new Task;
        $task->task_name   = $request->input('name');
        $task->body = $request->input('body');
        $task->assign          = $request->input('status');
        $task->priority        = $request->input('status');
        $task->duedate  = $request->input('date');
        $task->save();
        
    }

this is form date picker

 <div class="col-xs-3">
       <div class="input-group">
        <div class="input-group-addon">
         <i class="fa fa-calendar">
         </i>
        </div>
        <input class="form-control" id="date" name="date" placeholder="MM/DD/YYYY" type="text"/>
       </div>
      </div>

this is jquery function regarding with bootstrap date picker in app.blade.php

 <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
    <!-- Bootstrap Date-Picker Plugin -->
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
    <script>
    $(document).ready(function(){
      var date_input=$('input[name="date"]'); //our date input has the name "date"
      var container=$('.bootstrap-iso form').length>0 ? $('.bootstrap-iso form').parent() : "body";
      var options={
        format: 'mm/dd/yyyy',
        container: container,
        todayHighlight: true,
        autoclose: true,
      };
      date_input.datepicker(options);
    })
    </script>

save other form date without date value in My table duedate column save with 0000-00-00 values how can solve this?

10th July, 2017

Flex left a reply on Problem With Install Cloudder In Laravel • 1 month ago

@topvillas I dont know is it error message or other I mean

Publishing complete for tag[]!

Flex started a new conversation Problem With Install Cloudder In Laravel • 1 month ago

hello, going to install cloudder in My laravel app to upload some files. this is My steps

composer require jrm2k6/cloudder:0.4.*
modify .env file
CLOUDINARY_API_KEY=`your key`
CLOUDINARY_API_SECRET=`your secret`
CLOUDINARY_CLOUD_NAME=`your cloud name`
Add the following in config/app.php:

'providers' => array(
  'JD\Cloudder\CloudderServiceProvider'
);

'aliases' => array(
  'Cloudder' => 'JD\Cloudder\Facades\Cloudder'
);

final run

php artisan vendor:publish --provider="JD\Cloudder\CloudderServiceProvider"

but in My last step run artisan command My command prompt display this message

Publishing complete for tag[]!

My problem is this error message or am I not installing cloudder properly yet?

Flex started a new conversation Can I Use 2 Controllers For One Form Save Data To The Table? • 1 month ago

Hi, I have some problem about my form in Laravel app. see my form below

<form method="post" action="{{ route('tasks.store') }}">
 
     <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
                {{--<label for="name" class="control-label">Task List</label>--}}
                <input type="text" name="name" class="form-control" id="name" placeholder="Add Task" value="{{ old('name') ?: '' }}">
                @if ($errors->has('name'))
                    <span class="help-block">{{ $errors->first('name') }}</span>
                @endif
            </div>
    
    @endif
    

    <br>
    <div style='display:none'; class='somename'>

<div class="form-group">
        <textarea name='body'class="form-control">{{ old('body') }}</textarea>
    </div>

    <br>
     <div class="form-group-row">
                <label for="status" class="control-label">Choose Status</label>
                <select name="status" id="status">
                    <option value="">Choose a status</option>
                    <option value="Upcoming">Upcoming</option>
                    <option value="Active">Active</option>
                    <option value="Completed">Completed</option>
                </select>
                @if ($errors->has('status'))
                    <span class="help-block">{{ $errors->first('status') }}</span>
                @endif 

<div class="form-group{{ $errors->has('file_name') ? ' has-error' : '' }}">
                <input type="file" name="file_name" class="form-control" id="file_name">
                @if ($errors->has('file_name'))
                    <span class="help-block">{{ $errors->first('file_name') }}</span>
                @endif
            </div>

<div class="form-group">
                <button type="submit" class="btn btn-default">Save</button>
            </div>
            <input type="hidden" name="_token" value="{{ csrf_token() }}">
</form>

I need create 2 Controllers like TasksController to store input and select option data to the table and FilesConrtoller to store input file data.

TaskController.php

 public function store(Request $request)//, $id, Task $task)
    {
       

        $task = new Task;
        $task->task_name   = $request->input('name');
        $task->body = $request->input('body');
        $task->assign          = $request->input('status');
        $task->priority        = $request->input('status');
        $task->duedate  = $request->input('date');
      //  $task->project_id        = $id;

       

        $task->save();
    }

FilesController.php

 public function uploadAttachments(Request $request, $id)
    {
         $this->validate($request, [
            'file_name'     => 'required|mimes:jpeg,bmp,png,pdf|between:1,7000',
        ]);
 
        $filename     = $request->file('file_name')->getRealPath();
 
        Cloudder::upload($filename, null);
        list($width, $height) = getimagesize($filename);
 
        $fileUrl = Cloudder::show(Cloudder::getPublicId(), ["width" => $width, "height" => $height]);
        $this->saveUploads($request, $fileUrl, $id);
 
        return redirect()->back()->with('info', 'Your Attachment has been uploaded Successfully');
    }
 
    private function saveUploads(Request $request, $fileUrl, $id)
    {
        $file = new File;
        $file->file_name  = $request->file('file_name')->getClientOriginalName();
        $file->file_url   = $fileUrl;
        $file->project_id = $id;
        $file->save();
    }

My problem is this May I use 2 controller to store one form data? than how?

9th July, 2017

Flex left a reply on How To Fix Class 'Task' Not Found • 1 month ago

@Rubeez did you mean foreach?

Flex started a new conversation How To Fix Class 'Task' Not Found • 1 month ago

going to save some form data. then got following error

FatalErrorException in TasksController.php line 36: Class 'Task' not found

this is TaskController.php

public function store(Request $request)//, $id, Task $task)
    {
       

        $task = new Task;// line 36
        $task->task_name   = $request->input('name');
        $task->body = $request->input('body');
        $task->assign          = $request->input('status');
        $task->priority        = $request->input('status');
        $task->duedate  = $request->input('date');
      //  $task->project_id        = $id;

       

        $task->save();
    }

Task model

namespace App;

use App\User;
use App\Auth;
use App\Project;
use Illuminate\Database\Eloquent\Model;

class Task extends Model
{
     protected $fillable = ['task_name', 'body', 'assign','priority','duedate'];
    
    
    //
}

how to fix this?

Flex left a reply on How Can I Route This One? • 1 month ago

@CodebyRay is it Route::post('events/store/{id}' or Route::post('events/storetask/{id}'

Flex started a new conversation How Can I Route This One? • 1 month ago

My EventsController function is this

public function storetask(Request $request, $id, Task $task)
    {
        $task = new Task;
        $task->task_name   = $request->input('name');
        $task->body = $request->input('body');
        $task->assign          = $request->input('status');
        $task->priority        = $request->input('status');
        $task->duedate  = $request->input('date');
        $task->project_id        = $id;

        $task->save();
}

I need save using this function of the form data in My events folder show.blade.php file My form route is this

<form method="post" action="{{ route('events.storetask') }}">

My route.php is this

Route::resource('events', 'EventsController');

but I got this error message

Route [events.storetask] not defined. (View: C:\Users\Flex\Desktop\kuruja\resources\views\events\show.blade.php)

how can solve this?

6th July, 2017

Flex left a reply on Can I Save Same Form Data With 2 Models? • 1 month ago

@joyal OK clear your answer but I have some other problem that means as an example consider above project and note models some user fills only project data in the model and do not fill any data regarding note model(null value) in the form. then how the note model fill according to the form save data


project model

projectId     projectName          date
       1                 abc                 2017-07-05 

note model
noteId     noteName       note
  null            moab             hi

or

project model

projectId     projectName          date
       1                 abc                 2017-07-05 

note model
noteId     noteName       note
 

2nd July, 2017

Flex started a new conversation Can I Save Same Form Data With 2 Models? • 1 month ago

need save one form data values with 2 models. My form as follow

<form class="form-vertical" role="form" method="post" action="{{ route('projects.store') }}">
            <div class="form-group{{ $errors->has('status') ? ' has-error' : '' }}">
                <label for="status" class="control-label">Choose Status</label>
                <select name="status" id="status">
                    <option value="">Choose a status</option>
                    <option value="Upcoming">Upcoming</option>
                    <option value="Active">Active</option>
                    <option value="Completed">Completed</option>
                </select>
                @if ($errors->has('status'))
                    <span class="help-block">{{ $errors->first('status') }}</span>
                @endif
            </div>
            <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
                <label for="name" class="control-label">Name</label>
                <input type="text" name="name" class="form-control" id="name" value="{{ old('name') ?: '' }}">
                @if ($errors->has('name'))
                    <span class="help-block">{{ $errors->first('name') }}</span>
                @endif
            </div>
            <div class="form-group{{ $errors->has('due-date') ? ' has-error' : '' }}">
                <label for="due-date" class="control-label">Due date</label>
                <input type="date" name="due-date" class="form-control" id="due-date">
                @if ($errors->has('due-date'))
                    <span class="help-block">{{ $errors->first('due-date') }}</span>
                @endif
            </div>
            <div class="form-group{{ $errors->has('notes') ? ' has-error' : '' }}">
                <label for="notes" class="control-label">Notes</label>
                <textarea name="notes" class="form-control" id="notes" rows="5" cols="5">
                  {{ old('notes') ?: '' }}
                </textarea>
                @if ($errors->has('notes'))
                    <span class="help-block">{{ $errors->first('notes') }}</span>
                @endif
            </div>
            <div class="form-group">
                <button type="submit" class="btn btn-default">Create</button>
                
            </div>
            <input type="hidden" name="_token" value="{{ csrf_token() }}"> 
        </form>

I have 2 models as "project" and "note"

I need save save input box values and due date to project model and text area value to note model. can I do this with 2 controller or any other methods.....

1st July, 2017

Flex left a reply on Why Not Working Bootstrap Date Picker? • 1 month ago

@fraserk it is working but why did you mention as "This is a quick and dirty way to get it working"?

Flex left a reply on Why Not Working Bootstrap Date Picker? • 1 month ago

@fraserk no any error

Flex left a reply on Why Not Working Bootstrap Date Picker? • 1 month ago

@fraserk did it but same result.

Flex started a new conversation Why Not Working Bootstrap Date Picker? • 1 month ago

using bootstrap date picker plugin in Laravel app as following

@extends('layouts.app')

@section('content')

<!--  jQuery -->
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>

<!-- Isolated Version of Bootstrap, not needed if your site already uses Bootstrap -->
<link rel="stylesheet" href="https://formden.com/static/cdn/bootstrap-iso.css" />

<!-- Bootstrap Date-Picker Plugin -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/css/bootstrap-datepicker3.css"/>


<script>
    $(document).ready(function(){
      var date_input=$('input[name="date"]'); //our date input has the name "date"
      var container=$('.bootstrap-iso form').length>0 ? $('.bootstrap-iso form').parent() : "body";
      var options={
        format: 'mm/dd/yyyy',
        container: container,
        todayHighlight: true,
        autoclose: true,
      };
      date_input.datepicker(options);
    })
</script>

 <div class="col-xs-3">
       <div class="input-group">
        <div class="input-group-addon">
         <i class="fa fa-calendar">
         </i>
        </div>
        <input class="form-control" id="date" name="date" placeholder="MM/DD/YYYY" type="text"/>
       </div>
      </div>

show only input field. not display date picker how can solve this problem?

22nd June, 2017

Flex left a reply on How To Validate (check) Data Table Values Befour Data Insert In Laravel 5.2 • 1 month ago

I found some solutions

  $duplicate = Project::where('project_name',$project->project_name)->first();
        if($duplicate)
        {
            return redirect()->route('projects.index')->with('warning','Title already exists');
        }   

Flex left a reply on How To Validate (check) Data Table Values Befour Data Insert In Laravel 5.2 • 1 month ago

@Boris following error

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'name' in 'where clause' (SQL: select count(*) as aggregate from `projects` where `name` = ffffff)

My form input name is "name" but table columns name is "project_name"

Edit Your Profile
Update

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