I have 3 websites that will share the same database.
There are 3 tables: News, Photo Gallery, Blog.
It will only be a management system for the 3 websites.
Example: The user will save news that belonged only to 2 websites.
Question: What i...
I have a blog and I want to create a button for liking / sharing blog posts on facebook. Put the option for the person to enjoy and share the post over the comments of the blog. Is it possible to do this?
I have this model
public function exercicio()
{
return $this->belongsToMany(Exercicio::class);
}
and
public function treino()
{
return $this->belongsToMany(Treino::class);
}
My Controller
public function salvarTreino(Re...
Is it possible to define a function for all pages without using include() in all of them?
Ex: I have a secret directory ../seg/staff/login/ and I want to define that user with permission level less than 3 can not access them....
Model:
public function exibir_noticia()
{
$consulta = $this->db->query('SELECT * FROM Noticia_Site_Cairu');
return $consulta->result();
}
Controller
public function index()
{
$this->load->model('noticia_model');...
I'm in the middle of a problem, I'd like to use a array as a temporary table, more or less like this:
$array = [
"codigo" => "0123",
"descricao" => "produto"
];
But I would need it to be global , but I have many d...
I developed a project in Laravel 5.1. In Localhost everything works fine, but when I upload to the client server, which is not shared and is running PHP 5.6, it does not work.
The HTTP ERROR 500 error appears.
Can anyone help me?
I'm using Laravel 5.2 and I'm trying to create a validation for user registration.
In UserController.php I have:
public function postSignUp(Request $request){
$this->validate($request, [
'email' => 'required|email|unique:u...
I have the following regular expression for Friendly URL:
RewriteRule ^categoria/([a-z0-9-]+)/([a-z0-9-]+)/([a-z0-9-]+)/?$ categoria.php?idc=$1&nome=$2&pg=$3 [NC]
I would like to leave the 3 parameter, pg, optional, have or have not...