{"id":23044879,"url":"https://github.com/cmsrs/laracms","last_synced_at":"2026-05-16T11:32:48.552Z","repository":{"id":61709121,"uuid":"517413291","full_name":"cmsrs/laracms","owner":"cmsrs","description":"Installation cmsRS","archived":false,"fork":false,"pushed_at":"2022-10-27T07:20:56.000Z","size":66081,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-07T20:06:06.475Z","etag":null,"topics":["cms","gallery-images","laravel","laravel-package","shop"],"latest_commit_sha":null,"homepage":"https://www.cmsrs.pl/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmsrs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-24T19:06:16.000Z","updated_at":"2023-02-04T11:27:27.000Z","dependencies_parsed_at":"2022-10-20T09:15:12.744Z","dependency_job_id":null,"html_url":"https://github.com/cmsrs/laracms","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/cmsrs/laracms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsrs%2Flaracms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsrs%2Flaracms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsrs%2Flaracms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsrs%2Flaracms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmsrs","download_url":"https://codeload.github.com/cmsrs/laracms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsrs%2Flaracms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268333892,"owners_count":24233782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cms","gallery-images","laravel","laravel-package","shop"],"created_at":"2024-12-15T21:17:03.042Z","updated_at":"2025-10-04T02:33:08.302Z","avatar_url":"https://github.com/cmsrs.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# INSTALLATION \n\n```bash\ncomposer require cmsrs/laracms\n\nphp artisan vendor:publish --provider=\"Cmsrs\\Laracms\\Providers\\LaracmsProvider\" --force\n\nphp artisan migrate\n\nphp artisan db:seed\n``` \n\n\nRemove lines from file: ./routes/web.php:\n```php\n//Route::get('/', function () {\n//    return view('welcome');\n//});\n```\n\n\n \nConfigure jwtAuth (in nutshell):\n\n\n```bash\nphp artisan vendor:publish --provider=\"PHPOpenSourceSaver\\JWTAuth\\Providers\\LaravelServiceProvider\"\n\nphp artisan jwt:secret\n```\n\nin config/auth.php change to:\n\n```php\n    'defaults' =\u003e [\n        'guard' =\u003e 'api',\n        'passwords' =\u003e 'users',\n    ],\n\n    'guards' =\u003e [\n        'api' =\u003e  [\n            'driver' =\u003e  'jwt', //'token',\n            'provider' =\u003e 'users',\n            'hash' =\u003e false\n        ],\n        'web' =\u003e [\n            'driver' =\u003e 'session',\n            'provider' =\u003e 'users',\n        ],\n    ],\n\n    'providers' =\u003e [\n        'users' =\u003e [\n            'driver' =\u003e 'eloquent',\n            'model' =\u003e App\\Models\\User::class,\n        ],\n    ],\n```\n\nadd User.php file in: app/Models:\n\n```php\n\u003c?php\nnamespace App\\Models;\n\n\nuse Illuminate\\Notifications\\Notifiable;\nuse Illuminate\\Foundation\\Auth\\User as Authenticatable;\nuse Illuminate\\Support\\Facades\\Hash;\nuse Illuminate\\Support\\Facades\\Auth;\nuse PHPOpenSourceSaver\\JWTAuth\\Contracts\\JWTSubject;\n\nclass User extends Authenticatable implements JWTSubject\n{\n    use Notifiable;\n\n\n    public static $role = [\n        'admin' =\u003e 'admin',\n        'client' =\u003e 'client'\n    ];\n\n    /**\n     * The attributes that are mass assignable.\n     *\n     * @var array\n     */\n    protected $fillable = [\n        'name', 'email', 'password' , 'role'\n    ];\n\n    /**\n     * The attributes that should be hidden for arrays.\n     *\n     * @var array\n     */\n    protected $hidden = [\n        'password',\n        'remember_token',\n    ];\n\n    /**\n     * The attributes that should be cast to native types.\n     *\n     * @var array\n     */\n    protected $casts = [\n        'email_verified_at' =\u003e 'datetime',\n    ];\n\n    /**\n     * Get the identifier that will be stored in the subject claim of the JWT.\n     *\n     * @return mixed\n     */\n    public function getJWTIdentifier()\n    {\n        return $this-\u003egetKey();\n    }\n    /**\n     * Return a key value array, containing any custom claims to be added to the JWT.\n     *\n     * @return array\n     */\n    public function getJWTCustomClaims()\n    {\n        return [];\n    }\n\n    public function setPasswordAttribute($password)\n    {\n        if (!empty($password)) {\n            $this-\u003eattributes['password'] = Hash::make($password);\n\n        }\n    }\n\n    static public function getTokenForClient()\n    {\n        $user = Auth::user();\n        if( empty($user) ){\n            throw new \\Exception(\"User not auth\");\n        }\n\n        return $user-\u003egetTokenClient();\n    }\n\n    public function getTokenClient()\n    {\n        $appKey = env('APP_KEY');\n        if( empty($appKey) ){\n            throw new \\Exception(\"empty APP_KEY in config file\");\n        }\n                \n        return sha1($this-\u003eemail.\"_\".$this-\u003eid.\"_\".$appKey);\n    }\n\n    public function checkClientByToken($token)\n    {\n        $expectedToken = $this-\u003egetTokenClient();\n        if($expectedToken ==  $token){\n            return true;\n        }\n        return false;\n    }\n\n    static public function  checkApiClientByToken($token)\n    {\n        $user = Auth::user();\n        if( empty($user) ){\n            throw new \\Exception(\"User not auth - for check\");\n        }\n        if( !$user-\u003echeckClientByToken($token) ){\n            throw new \\Exception(\"User not valid - check\");\n        }\n        return true;\n    }\n\n}\n```\n\n\n\n\n\n```bash\nphp artisan serve\n```\n\n# MANAGMENT\n\n* go to the website http://127.0.0.1:8000/admin/\n\n    log in as:\n\n    username: adm@cmsrs.pl\n\n    password: cmsrs123\n\n* create main page (page type: main_page)\n\n* add menu\n\n* add pages\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmsrs%2Flaracms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmsrs%2Flaracms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmsrs%2Flaracms/lists"}