public function index(Request $request)
 {
     if ($request->getRequestUri() != '/') {
         $buttonClick = $request->getUri();
     }
     //WEBSITE SETTINGS
     $websiteSettings = Handler::readFile("websiteSettings.json");
     $projects = Projects::orderBy('sortorder', 'asc')->get();
     $lastProject = 0;
     foreach ($projects as $key => $project) {
         array_add($project, 'bootstrapColumn', Projects::bootstrapColumns($key));
         array_add($project, 'imagePrefixName', Projects::imagePrefixName($key));
         array_add($project, 'slug', Handler::createSlug($project->title, '-'));
         $lastProject = $project->sortorder;
     }
     return view('website.index')->with(compact('websiteSettings', 'projects', 'lastProject', 'buttonClick'));
 }
 public function getOrder()
 {
     if (!ACL::hasPermission('projects', 'edit')) {
         return redirect(route('projects'))->withErrors(['You don\'t have permission for edit the project.']);
     }
     $projects = Projects::orderBy('sortorder', 'ASC')->addSelect('projectsId')->addSelect('title')->addSelect('projectDate')->addSelect('sortorder')->get();
     return view('admin.projects.order')->with(compact('projects'));
 }