Sindbad~EG File Manager

Current Path : /home/numerotech/public_html/livemt2023.aios-scientificcommittee.org/app/models/
Upload File :
Current File : //home/numerotech/public_html/livemt2023.aios-scientificcommittee.org/app/models/Post.php

<?php


class Post extends Eloquent {

	protected $primaryKey = 'post_id';
	/**
	 * The database table used by the model.
	 *
	 * @var string
	 */
	protected $table = 'posts';



	public Static function GetType($type)
    {
        try
        {
           $posts = Post::where('post_type',$type)->orderby('display_order')->lists('post_name','post_id'); ; 
           
           return $posts;

        } catch (Exception $e)
        {
            Log::error('Models: Post  -> GetType '.$e->getMessage());
            return [];
        }
    }


	public Static function GetConPost($type,$user_id,$nom_id)
    {
        try
        {
            $posts = DB::select("call usp_getPostsByNomination('".$type."',".$user_id.",".intval($nom_id).")");

            // $posts = Post::join('nominations as nom','nom.post_id','=','posts.post_id')                        
            //             ->whereNotIn('post_name',array('None'))->where('post_type',$type)->orderby('display_order')->get(); 
           
           return $posts;

        } catch (Exception $e)
        {
            Log::error('Models: Post  -> GetConPost '.$e->getMessage());
            return [];
        }
    }


    // public Static function GetConPost($type)
    // {
    //     try
    //     {
    //        $posts = Post::whereNotIn('post_name',array('None'))->where('post_type',$type)->orderby('display_order')->get(); 
           
    //        return $posts;

    //     } catch (Exception $e)
    //     {
    //         Log::error('Models: Post  -> GetConPost '.$e->getMessage());
    //         return [];
    //     }
    // }


    
	
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists