public function about() { $about = About::all(); $skill = Skill::all(); $data = array('about' => $about, 'skill' => $skill); return view('about.index', $data); }
/** * 玩家卡片取得处理 */ public function cardBox() { // 玩家ID获取 $intPlayerId = Input::get('player_id'); // 玩家所持卡片全取得 $lstCard = OwnedCard::where('player_id', $intPlayerId)->get(); return view('admin.player.card-box')->withCards(Card::all())->withAttrs(Attr::all())->withRaces(Race::all())->withJobs(Job::all())->withSkills(Skill::all())->withOwnedCards($lstCard); }
/** * view homepage */ public function index() { $schoolprojects = Project::SchoolProject()->latest()->get(); $myprojects = Project::MyProject()->latest()->get(); $skills = Skill::all(); $skillTypes = SkillType::all(); //dd($skillTypes); return view('home', compact('skillTypes', 'schoolprojects', 'myprojects')); }
public function skillPageJson() { $return_array = array(); $skill = Skill::all(); foreach ($skill as $skill) { $data_array['id'] = $skill->id; $data_array['description'] = $skill->description; $data_array['point'] = $skill->point; $data_array['category'] = $skill->category; array_push($return_array, $data_array); } echo json_encode($return_array); }
public function design() { $roles = Role::all(); $users = User::all(); $userroles = DB::table('role_user')->get(); $jobstable = Job::all(); $userjobs = Userjobs::all(); $permissions = DB::table('permissions')->get(); $permissionroles = DB::table('permission_role')->get(); $skills = Skill::all(); $jobskills = JobSkill::all(); $userskills = UserSkill::all(); return View('design')->withJobs($jobstable)->withJobsusers($userjobs)->withusers($users)->withroles($roles)->withuserroles($userroles)->withpermissions($permissions)->withpermissionroles($permissionroles)->withskills($skills)->withjobskills($jobskills)->withuserskills($userskills); }
/** * Run the database seeds. * * @return void */ public function run() { $faker = Faker::create(); for ($i = 1; $i < 200; $i++) { $name = $faker->shuffle($faker->word()); $recodeID = $faker->boolean(50) ? rand(0, $i) : NULL; Character::create(['name' => $name, 'savename' => $name, 'class' => $faker->randomElement($array = array('A', 'B', 'C', 'D', 'S', 'SS', 'Z')), 'race' => $faker->boolean(50), 'pot' => $faker->boolean(50), 'pof' => $faker->boolean(50), 'adventurer' => $faker->boolean(50), 'recode_id' => NULL]); for ($t = 1; $t < 4; $t++) { Job::create(['name' => $faker->shuffle($faker->name()), 'number' => $t, 'element' => $faker->randomElement($array = array('None', 'Fire', 'Ice', 'Darkness', 'Lightning', 'Heal', 'Remedy')), 'weapon' => $faker->randomElement($array = array('Sword', 'Bow', 'Spear', 'Staff')), 'minHP' => $faker->numberBetween(0, 130), 'maxHP' => $faker->numberBetween(200, 900), 'minATK' => $faker->numberBetween(0, 130), 'maxATK' => $faker->numberBetween(200, 900), 'minDEF' => $faker->numberBetween(0, 130), 'maxDEF' => $faker->numberBetween(200, 900), 'minMATK' => $faker->numberBetween(0, 130), 'maxMATK' => $faker->numberBetween(200, 900), 'minMDEF' => $faker->numberBetween(0, 130), 'maxMDEF' => $faker->numberBetween(200, 900), 'character_id' => $i]); for ($s = 1; $s < 5; $s++) { $skillcount = Skill::all()->count(); $skill = Skill::where('id', rand(0, $skillcount - 1))->first(); JobSkill::create(['lvl' => rand(0, 15 * $s), 'skill_name' => $skill->name, 'affection' => $faker->word(), 'frequency' => rand(0, 101), 'job_id' => $t * $i]); $itemcount = Item::all()->count(); $item = Item::where('id', rand(0, $itemcount - 1))->first(); JobItem::create(['quantity' => rand(0, 51), 'item_name' => $item->name, 'job_id' => $t * $i]); } } for ($j = 0; $j < rand(1, 5); $j++) { Iteration::create(['trigger' => $faker->word(), 'content' => $faker->text(), 'character_id' => $i, 'trigger_id' => NULL]); } } }
/** * 取得全部技能的JSON * * @return Response JSON */ public function skills() { $skills = Skill::all(); return Response::json($skills); }
public function showUserAddProjectForm() { $skill_categories = SkillCategories::all(); $project_type = ProjectType::all(); $project_duration = ProjectDuration::all(); $project_budget = ProjectBudget::all(); $skills = Skill::all(); return view('addproject')->with('skill_categories', $skill_categories)->with('project_type', $project_type)->with('project_budget', $project_budget)->with('project_duration', $project_duration)->with('skills', $skills); }
/** * Display a listing of the resource. * * @return Response */ public function index() { //Index return view('admin.skill.index')->withType1s(Type1::all())->withType2s(Type2::all())->withAttrs(Attr::all())->withSkills(Skill::all()); }
/** * 卡片更新页面 * @param $id * @return mixed */ public function edit($id) { return view('admin.card.edit')->withCard(Card::find($id))->withAttrs(Attr::all())->withRaces(Race::all())->withJobs(Job::all())->withSkills(Skill::all()); }
public function getSkills($jobId) { return $jobId ? Job::findOrFail($jobId)->skills : Skill::all(); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { // $card = Card::find($id); return view('admin.card.edit')->withCard(Card::find($id))->withSkills(Skill::all())->withLskills(Lskill::all())->withAbilities(Ability::all())->withType1s(Type1::all())->withType2s(Type2::all())->withAttrs(Attr::all()); }
/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $skills = Skill::all(); return view('jobs.create')->withSkills($skills); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $skills = Skill::all(); return view('pages.index-skill', compact('skills')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { // return view('admin.skill.skill')->withSkills(Skill::all())->withAttrs(Attr::all())->withRaces(Race::all())->withJobs(Job::all()); }
public function skill() { $skill = Skill::all(); $data = array('skill' => $skill); return view('blog.skill', $data); }