本文整理汇总了PHP中app\Project::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Project::all方法的具体用法?PHP Project::all怎么用?PHP Project::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Project
的用法示例。
在下文中一共展示了Project::all方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
//
return view('projects.index');
$projects = Project::all();
return view('projects.index', compact('projects'));
}
示例2: index
/**
* Show the application dashboard.
*
* @return Response
*/
public function index()
{
$clients = Client::all();
$projects = Project::all();
$notes = ClientNote::all();
return view('home')->with('clientCount', count($clients))->with('projectCount', count($projects))->with('noteCount', count($notes));
}
示例3: directRe
/**
* Display the specified resource.
*
* @param int $id
* @return Response
*/
public function directRe($id)
{
$proyecto = Project::find($id);
$boolean = false;
$projects = Project::all();
return view('admin.residente.create', compact('proyecto', 'boolean', 'projects'));
}
示例4: get_single
public function get_single(Request $request, $id)
{
$view = view::make("project");
$view->projects = Project::all();
$view->active_project = Project::find($id);
return $view;
}
示例5: composeNavigation
/**
* Bind variables to the navigation bar.
*/
private function composeNavigation()
{
view()->composer('nav', function ($view) {
$view->with('projects', Project::all());
$view->with('user', Auth::User());
});
}
示例6: create_project
public function create_project()
{
$project_name = $_POST['project_name'];
$project = Project::create(['name' => $project_name]);
$projects = Project::all()->toArray();
return view('Pages.Projects.project_created', compact('projects'));
}
示例7: boot
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
/**
* sidebar pm filter (it shows the pm even though the pm is deleted)
*/
view()->composer('includes.sidebar_home', function ($view) {
$allprojects = Project::all();
$fmanagers = [];
foreach ($allprojects as $project) {
if (!in_array($project['pm'], $fmanagers)) {
$fmanagers[] = $project['pm'];
}
}
$view->with('fmanagers', $fmanagers);
});
view()->composer('includes.sidebar_show', function ($view) {
$allprojects = Project::all();
$fmanagers = [];
foreach ($allprojects as $project) {
if (!in_array($project['pm'], $fmanagers)) {
$fmanagers[] = $project['pm'];
}
}
$view->with('fmanagers', $fmanagers);
});
}
示例8: index
/**
* Display a list of all of the user's tickets.
*
* @return Response
*/
public function index()
{
$user = Auth::user();
//dd($user);
$projects = Project::all();
$tickets = $this->tickets->forUser($user);
return view('dashboard.index', ['projects' => $projects, 'tickets' => $tickets]);
}
示例9: index
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
// Ici on va faire en sorte d'afficher les taches des gens qui les ont créé , on vérifie ca grace a leur email
// comme ca jean pourra pas voir ce que claude a fait par exemple
$email = Auth::user();
$projects = Project::all()->where('mail', $email->email);
return view('pages.showProjects', compact('projects'));
}
示例10: index
/**
* @return Response
*/
public function index()
{
$tokens = Token::all();
$projects = Project::lists('name', 'pid');
$all_projects = Project::all();
//Second variable created here to get around weird indexing needed for pivot table in $projects
return view('tokens.index', compact('tokens', 'projects', 'all_projects'));
}
示例11: deleteProjects
/**
* Deletes a $num project(s).
*
* @param $num
*/
private function deleteProjects($num)
{
$entries = Project::all();
$toDelete = min($num, count($entries));
for ($i = 0; $i < $toDelete; $i++) {
$entries[$i]->delete();
}
$this->line('Deleted ' . $toDelete . ' projects.');
}
示例12: testRestoreProjectAction
function testRestoreProjectAction()
{
Project::find(1)->delete();
// FIXED fails because Project::find(id) wouldn't return a trashed project
$this->post('/projects/1/restore')->seeStatusCode(200)->shouldReturnJson();
$json = $this->_parseJsonResponse();
$this->assertCount(5, Project::all());
$this->assertNull($json['deleted_at']);
}
示例13: backend
/**
* Display Backend Area.
*/
public function backend()
{
$users = User::where('id', '<>', 1)->get();
$categories = Category::all();
$projects = Project::all();
$images = Image::all();
$links = Link::all();
return view('pages/backend/index')->with('users', $users)->with('categories', $categories)->with('projects', $projects)->with('links', $links)->with('images', $images);
}
示例14: getProjectsIdsArray
private function getProjectsIdsArray()
{
$result = [];
$projects = Project::all();
foreach ($projects as $project) {
$result[] = $project->id;
}
return $result;
}
示例15: dashboard
public function dashboard()
{
$prospeks = Prospek::all();
$projects = Project::all();
$pelatihans = Pelatihan::all();
$rpds = Rpd::mine()->where('status', 'BACK TO INITIATOR')->orWhere('status', 'SUBMIT')->orderBy('kode')->paginate(10);
$users = Pegawai::all();
$lpds = Lpd::mine()->where('status', 'BACK TO INITIATOR')->orWhere('status', 'SUBMIT')->orWhere('status', 'TAKE PAYMENT')->where('status', 'BACK TO INITIATOR')->orWhere('status', 'PROCESS PAYMENT')->orderBy('kode')->paginate(10);
return view('dashboard', compact('prospeks', 'projects', 'pelatihans', 'rpds', 'users', 'lpds'));
}