DB Migrations, adding ship type
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
@ -24,6 +24,7 @@ class ShipsController extends Controller
|
||||
$ship->shipId = strtoupper(request('shipId'));
|
||||
$ship->shipName = request('shipName');
|
||||
$ship->shipOwner = request('shipOwner');
|
||||
$ship->shipType = request('shipType');
|
||||
$ship->created_at = now();
|
||||
$ship->save();
|
||||
}catch(\Exception $e){
|
||||
@ -54,7 +55,8 @@ class ShipsController extends Controller
|
||||
DB::table('ships')->where('id', $request->get('editShip'))->update(array(
|
||||
'shipId' => strtoupper(request('shipId')),
|
||||
'shipName' => request('shipName'),
|
||||
'shipOwner' => request('shipOwner')
|
||||
'shipOwner' => request('shipOwner'),
|
||||
'shipType' => request('shipType')
|
||||
));
|
||||
}catch(\Exception $e){
|
||||
Log::error($e);
|
||||
|
@ -10,6 +10,6 @@ use Kyslik\ColumnSortable\Sortable;
|
||||
class Ships extends Model
|
||||
{
|
||||
use Sortable;
|
||||
public $sortable = ['shipId', 'shipName', 'shipOwner'];
|
||||
public $sortable = ['shipId', 'shipName', 'shipOwner', 'shipType'];
|
||||
protected $casts = ['id' => 'string'];
|
||||
}
|
||||
|
Reference in New Issue
Block a user