1. Go to this page and download the library: Download codwelt/laravel-blog library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App;
use Codwelt\Blog\Operations\Core\Traits\CreatorOfPosts;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use CreatorOfPosts;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['id', 'name', 'email', 'password', 'cargo', 'imgperfil', 'telefono', 'emailsecundario', 'activo'];
/**
* Debe retornar el nombre de quien crea el post
* @return string
*/
public function getNameModel()
{
return $this->name;
}
}
namespace App;
use Codwelt\Blog\Operations\Core\Traits\CommentatorOfPosts;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use CommentatorOfPosts;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['id', 'name', 'email', 'password', 'cargo', 'imgperfil', 'telefono', 'emailsecundario', 'activo'];
/**
* Debe retornar el nombre de quien crea el post
* @return string
*/
public function getNameModel()
{
return $this->name;
}
/**
* Correo electronico que se mostrara en los comentarios
* @return string
*/
public function getEmailModel()
{
return $this->email;
}
/**
* Debe retornar la url de la foto de perfil del usuario, si se retorna nulo se asigna una foto por defecto
* @return mixed
*/
public function getUrlImageProfile(){
$this->url_profile;
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.