Did a little code clean up

This commit is contained in:
mwalbeck 2016-11-15 19:53:04 +01:00
parent 0b1e01a848
commit 292faf59eb
5 changed files with 4 additions and 13 deletions

View file

@ -4,7 +4,6 @@ namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Auth;
use App\Test;
class Group extends Model
{
@ -45,10 +44,6 @@ class Group extends Model
public function deleteGroup()
{
if (Auth::user()->isAdministrator()) {
$this->delete();
return true;
}
return false;
$this->delete();
}
}

View file

@ -14,7 +14,6 @@ class Option extends Model
public function deleteOption()
{
$this->delete();
return true;
}
public function addOption($question, $optionData)

View file

@ -33,7 +33,6 @@ class Question extends Model
$option->deleteOption();
}
$this->delete();
return true;
}
public function addQuestion($test, $request)
@ -93,4 +92,4 @@ class Question extends Model
}
$this->update();
}
}
}

View file

@ -5,8 +5,6 @@ namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\Auth;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Group;
use App\Testdetail;
class User extends Authenticatable
{
@ -280,4 +278,4 @@ class User extends Authenticatable
return "admin";
}
}
}
}

View file

@ -8,7 +8,7 @@ Currently there is no documentation for this project (But I'm slowly working on
Though if you want to play around with it you just need to clone the repo, get composer and run the composer install and you're good to go.
I'm developing this project in PHP 7 (should work with 5.6) and using MariaDB for the database, but it should work with most databases.
I'm developing this project in PHP 7 and using MariaDB for the database, but it should work with most databases.
The laravel version is 5.3.