示例#1
0
 public function appView($app_id)
 {
     $appInfo = App::dataHandle(App::find($app_id));
     if (!$appInfo) {
         header('Location:' . action('App\\Http\\Controllers\\HomeController@index'));
     }
     $commendApps = App::dataHandle(App::where('category_id', '=', $appInfo->category_id)->where('id', '!=', $app_id)->orderBy('download', 'desc')->take(4)->get());
     return view('index.appView')->with(['appInfo' => $appInfo, 'commendApps' => $commendApps]);
 }
示例#2
0
 public function apps()
 {
     $apps = $this->hasMany('App\\App');
     return App::dataHandle($apps);
 }