src/models/MenuItem.php
public static function boot()
	{
		parent::boot();

		static::saving(function($menuItem) {
			if ($menuItem->skipEvents) return;

			if (Input::exists('child_menu_id') && !Input::get('child_menu_id')) {
				$menuItem->child_menu_id = null;
			}
		});
		static::creating(function($menuItem) {
			if ($menuItem->skipEvents) return;

			$menuItem->order   = static::where('menu_id', Input::get('menu_id'))->count();
			$menuItem->menu_id = Input::get('menu_id');
			$menuItem->fmodel  = Input::get('fmodel');
			$menuItem->fid     = Input::get('fid');
		});
	}
public static function boot()
	{
		parent::boot();

		static::saving(function($menuItem) {
			if ($menuItem->skipEvents) return;

			if (Input::exists('child_menu_id') && !Input::get('child_menu_id')) {
				$menuItem->child_menu_id = null;
			}
		});
		static::creating(function($menuItem) {
			if ($menuItem->skipEvents) return;

			$menuItem->order   = static::where('menu_id', Input::get('menu_id'))->count();
			$menuItem->menu_id = Input::get('menu_id');
			$menuItem->fmodel  = Input::get('fmodel');
			$menuItem->fid     = Input::get('fid');
		});
	}
/////////////////////////////////////////////